Search Results

Search found 1121 results on 45 pages for 'driving'.

Page 33/45 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Want custom title / image / description in facebook share link

    - by Ezop
    Hi! I am making a flash app that demonstrates potensial traffic injuries when driving at different speeds. I want the user to be able to share this information on facebook. However this demands that i can customize the text that will appear on facebook in some manner. I am making an url that is opened in a blank window (from the flash app itself). I specify the u and t parameters, putting the generated message as the t parameter. But this seems to always be overridden by the pages title. If i omit the title tag from the html code, the file name is used (also overriding the specified title). http://www.facebook.com/sharer.php?u=http://espentokerud.com/face/addiste.html&t=test; I also tried url-encoding the url, but to no avail. http://www.facebook.com/sharer.php?u=http%3a%2f%2fespentokerud.com%2fface%2faddiste.html&t=test; I also tried using the addthis API, but experience the same shortcomings. The funny thing is that if i post a swf, the title and description can be customized, and it is also possible to specify a screenshot. But if i dont post a swf, this seems to be ignored. I am aware that I can use meta tags on the html page to specify the thumbnail image, title and description, but some of this content has to be based on calculations inside the flash app. Can anyone help me out or point me in the right direction? I am thankful for any help!

    Read the article

  • How do I make an ellipse blink?

    - by MedicineMan
    I am trying to make a custom control in WPF. I want it to simulate the behavior of a LED that can blink. There are three states to the control: On, Off, and Blinking. I know how to set On and Off through the code behind, but this WPF animation stuff is just driving me nuts!!!! I cannot get anything to animate whatsoever. The plan is to have a property called state. When the user sets the value to blinking, I want the control to alternate between green and grey. I'm assuming I need a dependency property here, but have no idea. I had more xaml before but just erased it all. it doesn't seem to do anything. I'd love to do this in the most best practice way possible, but at this point, I'll take anything. I'm half way to writing a thread that changes the color manually at this point. <UserControl x:Class="WpfAnimation.LED" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width="300"> <Grid> <Ellipse x:Name="MyLight" Height="Auto" Width="Auto"/> </Grid> </UserControl>

    Read the article

  • How do I make Master/Detail subreports in ReportBuilder come out right?

    - by Mason Wheeler
    I've got a report in ReportBuilder that's supposed to report on two objects. I didn't create this report, and I can't ask the person who did about how it works. Before running the report, we have some code that goes through, finds all the properties on the objects, and loads them into a memory dataset that looks like this: OBJECT_ID: TStringField PROP_NAME: TStringField PROP_VALUE: TStringField The report engine then creates a line on the report for each property in this dataset. This is implemented in a sub-report, whose parent only contains an OBJECT_ID, which is a human-readable name. Everything was going great until we had to display a "comment" of arbitrary size in the report. I made a second sub-report with a TMemoField so it could hold the text, and set the report up in the report designer. What I expect when I run the report is something that looks like this: HEADER Object 1 properties Object 1 comment Object 2 properties Object 2 comment I've managed to get just about everything but that. I used the MasterDataPipeline and MasterFieldLinks properties of the sub-report's pipelines to try to link the OBJECT_IDs of the sub-reports to the OBJECT_ID of the header, and that's the closest I've managed to come, but now what I see is: HEADER Object 1 properties Object 1 comment Object 2 comment The "Object 2 properties" section is nowhere to be seen, even though I've manually verified that the data is making it into the dataset correctly. This is driving me nuts. Any ReportBuilder gurus out there know what's going on and now to fix it?

    Read the article

  • Django - The included urlconf doesn't have any patterns in it

    - by unsorted
    My website, which was working before, suddenly started breaking with the error "ImproperlyConfigured at / The included urlconf resume.urls doesn't have any patterns in it" The project base is called resume. In settings.py I have set ROOT_URLCONF = 'resume.urls' Here's my resume.urls, which sits in the project root directory. from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^resume/', include('resume.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'django.contrib.auth.views.login'), #(r'^employer/', include(students.urls)), (r'^ajax/', include('urls.ajax')), (r'^student/', include('students.urls')), (r'^club/(?P<object_id>\d+)/$', 'resume.students.views.club_detail'), (r'^company/(?P<object_id>\d+)/$', 'resume.students.views.company_detail'), (r'^program/(?P<object_id>\d+)/$', 'resume.students.views.program_detail'), (r'^course/(?P<object_id>\d+)/$', 'resume.students.views.course_detail'), (r'^career/(?P<object_id>\d+)/$', 'resume.students.views.career_detail'), (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'C:/code/django/resume/media'}), ) Anyone know what's wrong? This is driving me crazy. Thanks,

    Read the article

  • Dynamically specify and change a Silverlight DataGrid's columns during runtime (MVVM)

    - by Biggert
    What's the best method of dynamically specifying DataGrid columns in the Silverlight DataGrid control at runtime following the MVVM pattern? What I'd like to do would be bind the "DataGrid.Columns" property to a property in my ViewModel so that, if the user adds/removes columns, I simply update the ViewModel property and the DataGrid would change. Problem is, the "DataGrid.Columns" property can't be bound to (I don't think). Because this property isn't available nor is the DataGrid control itself available at the ViewModel level, my current approach is to step outside of the MVVM pattern for this particular implementation and capture certain events in View's code-behind using MVVM Light's Messenger class and then talk directly with the DataGrid control to achieve this capability. I know this is a general statement to this approach without details but is there an easier way... or maybe not so much easier, but a better way that adheres to the MVVM pattern a little better? It's driving me crazy that the DataGrid control's Columns property can't be bound... seems like such a simple thing. FYI - Before it's suggested to use AutoGenerateColumns = True, the class being bound for each item in the collection that's bound to DataGrid.ItemsSource does not have individual properties to identify what is bound to the columns... it's a collection property that contains the columns in order to keep them completely dynamic so that particular path is out. Also, handling the AutoGeneratingColumns and using e.Cancel to show/hide columns is also iffy for this same reason (I think).

    Read the article

  • Why does Internet Explorer break "pegman" display in Google Maps API v3?

    - by Chad
    On my site here, the SteetView control, aka "Pegman", works great under Firefox. Under IE (7 in this case, but tested on 8 as well - same result) it breaks the display of the pegman control. Here's my map code: var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; directionsDisplay = new google.maps.DirectionsRenderer(); var milBase = new google.maps.LatLng(35.79648921414565, 139.40663874149323); var mapOpts = { streetViewControl: true, zoom: 12, center: milBase, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU }, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map($("#dirMap").get(0), mapOpts); directionsDisplay.setMap(map); var basePoly = new google.maps.Polygon({ paths: [new google.maps.LatLng(35.724496338474104, 139.3444061279297), new google.maps.LatLng(35.74748750802863, 139.3363380432129), new google.maps.LatLng(35.75765724051559, 139.34303283691406), new google.maps.LatLng(35.76545779822543, 139.3418312072754), new google.maps.LatLng(35.767547103447725, 139.3476676940918), new google.maps.LatLng(35.75835374997911, 139.34955596923828), new google.maps.LatLng(35.755149755962755, 139.3567657470703), new google.maps.LatLng(35.74679090345495, 139.35796737670898), new google.maps.LatLng(35.74762682821177, 139.36294555664062), new google.maps.LatLng(35.744422402303826, 139.36346054077148), new google.maps.LatLng(35.74860206266584, 139.36946868896484), new google.maps.LatLng(35.735644401200986, 139.36843872070312), new google.maps.LatLng(35.73843117306677, 139.36174392700195), new google.maps.LatLng(35.73592308277646, 139.3531608581543), new google.maps.LatLng(35.72686543236113, 139.35298919677734), new google.maps.LatLng(35.724496338474104, 139.3444061279297)], strokeColor: "#ff0000", strokeOpacity: 0.8, strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.35 }); basePoly.setMap(map); var marker = new google.maps.Marker({ position: new google.maps.LatLng(35.79648921414565, 139.40663874149323), map: map, title: "Ruby International" }); function calcRoute() { var start = new google.maps.LatLng(35.74005964772476, 139.37083393335342); var end = new google.maps.LatLng(35.79648921414565, 139.40663874149323); var request = { origin: start, destination: end, travelMode: google.maps.DirectionsTravelMode.DRIVING }; directionsService.route(request, function(result, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(result); } }); } The only real difference from my code and Google's code is that I use jQuery's document ready function instead of the body onload event to initialize my map. Can't imagine that's the cause though (works in v2 of the maps). Have I found a bug or is there something wrong in my code? Thanks in advance!

    Read the article

  • I got MVVM 3-Level-Master-Detail Switchting working but with CRUD operations now everything seems st

    - by msfanboy
    Hello, I have 1 UserControl (SchoolclassAdministration.xaml) that is datatemplated with 1 ViewModel (SchoolclassAdministrationViewModel) I have 3 Models and 3 ViewModels in that scenario. Those 3 ViewModels must reflect the requirements of the View. The requirements are 3 "Areas" on the left side and 2 "Areas" on the right side. 3: SchoolclassFormular PupilFormular SubjectFormular Those have all Buttons for Add/Delete 2: PupilsDataGrid SubjectsDataGrid The Master-Detail scenario is between the: SchoolclassFormular = PupilsDataGrid = SubjectsDataGrid The switching of the ViewModelCollections work! My Problem scenario is this: The DataContext is on the SchoolclassAdministrationViewModel what is the ViewModel containing the AllSchoolclassesViewModel ObservableCollection bound to the SchoolclassAdministration.xaml UserControl. My SchoolclassViewModel,PupilViewModel and SubjectViewModel has all Properties, Commands(Add/Delete). My Question: How can I set these 3 ViewModels as DataContext to my ONE SchoolclassAdministration.xaml UserControl I have? Before you answer... putting every ViewModel(schoolclass,pupil,subject) in its own UserControl will not help me because then the Master-Detail switching can NOT work anymore. Every related ViewModels need to be put in a related/ONE UserControl. OK now I can`t wait for an answer because that scenario is driving me nuts for weeks.

    Read the article

  • InterIMAP, Viewing UNREAD IMAP mail and Downloading Attachments in C#

    - by Erika
    I was wondering if anyone can help me on this cause its driving me mad trying get this working I was working with the trail of mail.dll from http://www.lesnikowski.com/mail/ which is an extremely fantastic tool which unfortunately i cannot afford being a student (even though its around 150eur, its still very expensive to me :/) and this would be a small module in my thesis and my faculty cannot afford to buy these things for students either :/ so anyway I had to go for a free tool (so please dont suggest any non open source ones - trust me i have tried them ALL).. Well, i'm trying to explore InterIMAP, and for several hours have been trying to list unread emails from my gmail account but it just doesn't seem to be working. I can connect just fine but finding the unread emails seems to be no easy task.. I have tried countless approaches but non seem to give me unread emails in my inbox (I have loads of emails in my inbox and i just want the unread ones). Would someone please assist me? I have been trying to get this working for ages now, but documentation is rather lacking and my every attempt has resulted in a fail so far. Please help!! Some code i currently have: ` IMAPConfig config = new IMAPConfig("myhost", "username", "pass", true, true, ""); config.CacheFile = ""; IMAPClient client = null; try { client = new IMAPClient(config, null, 5); } catch (IMAPException e) { Console.WriteLine(e.Message); return; } Console.WriteLine(DateTime.Now.ToString()); IMAPFolder f = client.Folders["INBOX"]; IMAPSearchResult sResult = f.Search(IMAPSearchQuery.QuickSearchNew()); // <--- Gives me no results even though i do have unread messages!

    Read the article

  • Memory leak when using Workflow 4.0 SqlWorkflowInstanceStore and PersistableIdleAction.Unload

    - by Rohland
    Hi, This particular problem is driving me nuts. I wonder if anyone has experienced a similar problem. If I load up a workflow then unload it and perform a memory snapshot then the result is predictable - my workflow is no longer in memory. However, if I load up a workflow and set the PersistableIdle action to PersistableIdleAction.Unload and let the workflow idle the workflow remains in memory even though the Unload action fires. I used ANTS Memory Profiler to debug this issue. This is the object retention graph outputted showing that an internal object is hanging onto my workflow instance. Can anyone else verify this problem? My code amounts to the following: Create SqlWorkflowInstanceStore and setup lock owner handle -- At this point I take a memory snapshot Create an instance of Workflow1 Set the PersistableIdle action Apply the instancestore to Workflow1 Setup action event handlers for Idle, Unload, UnhandledException etc. Persist the workflow instance Run the workflow instance Wait for instance to idle (caused by Delay activity) Ensure the Unload action is fired -- At this point I take a second memory snapshot From the above image, it is clear that the only object referencing Workflow1 is some internal event handlers result which I have no ability to dispose of. Any clues?

    Read the article

  • XSLT: Regular Expression function does not work?

    - by Fedor Steeman
    Ok, this one has been driving me up the wall... I have a xslt function that is supposed to split out the Zip-code part from a Zip+City string depending on the country. I cannot get it to work! This is what I got so far: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/functions" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:function name="exslt:GetZip" as="xs:string"> <xsl:param name="zipandcity" as="xs:string"/> <xsl:param name="countrycode" as="xs:string"/> <xsl:choose> <xsl:when test="$countrycode='DK'"> <xsl:analyze-string select="$zipandcity" regex="(\d{4}) ([A-Za-zÆØÅæøå]{3,24})"> <xsl:matching-substring> <xsl:value-of select="regex-group(1)"/> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:text>fail</xsl:text> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:when> <xsl:otherwise> <xsl:text>error</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:function> I am running it on a source XML where the following values are passed to the function: zipandcity: "DK-2640 København SV" countrycode: "DK" ...will output 'fail'! I think there is something I am misunderstanding here...

    Read the article

  • JSON/PrototypeJS - why does this only work SOMETIMES?

    - by koko
    This is driving me nuts! I'm getting some JSON from my server: {"id262":{"done":null,"status":null,"verfall":null,"id":262,"bid":20044,"art":"owner","uid":"demo02","aktion":null,"termin_datum":null,"docid":null,"gruppenid":null,"news":"newsstring","datum":"11.06.2010","header":"headerstring","for_uid":"demo01"}, "id263":{"done":null,"status":"pending","verfall":null,"bid":20044,"id":263,"uid":"demo02","art":"foo","aktion":"dosomething","termin_datum":"11.06.2010","docid":null,"gruppenid":null,"datum":"11.06.2010","news":"newsstring","for_uid":"demo01","header":"headerstring"}, "id261":{"done":null,"status":null,"verfall":null,"id":261,"bid":20044,"art":"termin","uid":"demo02","aktion":null,"termin_datum":"25.06.2010","docid":null,"gruppenid":null,"news":"newsstring","datum":"11.06.2010","header":"headerstring","for_uid":null}} This is how my JS looks like: var user = 'demo02'; new Ajax.Request('myscript.pl?someparameter=value', { method:'get', onSuccess: function(transport){ var db_json = transport.responseText.evalJSON(), propCount = 0, someArray1 = [], someArray2 = [], otherArray = []; //JSON DEBUG console.log('validated string:'); console.log(transport.responseText.evalJSON(true)); for(var prop in db_json) { propCount++; if ( (db_json[prop].art == 'foo') && (db_json[prop].for_uid == user) ) { someArray1.push(db_json[prop]); } else if( (db_json[prop].art == 'foo') && (db_json[prop].uid == user) ) { someArray2.push(db_json[prop]); } else if( db_json[prop].art == 'log' ) { otherArray.push(db_json[prop]); } } if(someArray1.length>0) { someArray1.map(function(el){ $('someArray1target').innerHTML += el.done; //do more stuff }); } if(someArray2.length>0) { someArray2.map(function(el){ $('someArray2target').innerHTML += el.done; //do more stuff }); } }); Sometimes, it works perfectly. Sometimes, i get my JSON String (it appears in Firebug's "answer"-tab), but it won't log the JSON in console-log(). I'm not getting any errors and javascript is still working. Next time after reloading, it might work, but it might not. I cannot remotely imagine why this only happens sometimes!

    Read the article

  • SQL Server 2008 Express w/Adv Services Command Line Install

    - by RobC
    I'm attempting to include an install of SQL Server 2008 Express w/Adv. Services with an installation package, but am having a heck of a time getting the installation to complete. Typically, this installation will take place on brand-new servers that get shipped to new customers, but this won't always be the case: Sometimes, the installation will take place on machines already in use, and so I've been told the installer has to work for XP x86 and x64 and Win 7 x32 and x64. The command line I'm passing in is: setup.exe /ACTION=INSTALL /INSTANCENAME="MSSQLSERVER" /HIDECONSOLE /QS /FEATURES="SQLENGINE" "REPLICATION" "FULLTEXT" "RS" "BIDS" "SSMS" "SNAC_SDK" "OCS" /SECURITYMODE=SQL /SAPWD="aStrongPassword" /NPENABLED=1 /TCPENABLED=1 /SQLSYSADMINACCOUNTS="%USERDOMAIN%\Administrator" SQLSVCACCOUNT="NT AUTHORITY\Network Service" (This is only my most recent attempt, in which I used a SQLSYSADMINACCOUNTS value that I saw in a posting elsewhere on this site. I've tried lots of combinations from various sites.) The SQL installer's Summary.txt begins: Exit code (Decimal): -2068578304 Exit facility code: 1204 Exit error code: 0 Exit message: The specified credentials that were provided for the SQL Server service are not valid. To continue, provide a valid account and password for the SQL Server service. This seems simple enough to fix (and maybe I"m overlooking something obvious), which is why it's driving me nuts. If any of you have any suggestions, I'd appreciate it. (I've got to take off for the weekend, so don't interpret my delayed response as a lack of interest.) Thanks.

    Read the article

  • How do I reference Django Model from another model

    - by user313943
    Im looking to create a view in the admin panel for a test program which logs Books, publishers and authors (as on djangoproject.com) I have the following two models defined. class Author(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) email = models.EmailField() def __unicode__(self): return u'%s %s' % (self.first_name, self.last_name) class Book(models.Model): title = models.CharField(max_length=100) authors = models.ManyToManyField(Author) publisher = models.ForeignKey(Publisher) publication_date = models.DateField() def __unicode__(self): return self.title What I want to do, is change the Book model to reference the first_name of any authors and show this using admin.AdminModels. #Here is the admin model I've created. class BookAdmin(admin.ModelAdmin): list_display = ('title', 'publisher', 'publication_date') # Author would in here list_filter = ('publication_date',) date_hierarchy = 'publication_date' ordering = ('-publication_date',) fields = ('title', 'authors', 'publisher', 'publication_date') filter_horizontal = ('authors',) raw_id_fields = ('publisher',) As I understand it, you cannot have two ForeignKeys in the same model. Can anyone give me an example of how to do this? I've tried loads of different things and its been driving me mad all day. Im pretty new to Python/Django. Just to be clear - I'd simply like the Author(s) First/Last name to appear alongside the book title and publisher name. Thanks

    Read the article

  • DataTableReader is invalid for current DataTable 'TempTable'

    - by Sk93
    Hi, I'm getting the following error whenever my code creates a DataTableReader from a valid DataTable Object: "DataTableReader is invalid for current DataTable 'TempTable'." The thing is, if I reboot my machine, it works fine for an undertimed amount of time, then dies with the above. The code that throws this error could have been working fine for hours and then: bang. you get this error. It's not limited to one line either; it's every single location that a DataTableReader is used. Also, this error does NOT occur on the production web server - ever. This is an example of one of the lines where it falls over: If I step over this line, I get this: However, if I do this in the immediate window: I get no problems. Same goes if I actually use that line in the code. This has been driving me nuts for the best part of a week, and I've failed to find anything on Google that could help (as I'm pretty positive this isn't a coding issue). Some technical info: DEV Box: Vista 32bit (with all current windows updates) Visual Studio 2008 v9.0.30729.1 SP dotNet Framework 3.5 SP1 SQL Server: Microsoft SQL Server 2005 Standard Edition- 9.00.4035.00 (X64) Windows 2003 64bit (with all current windows updates) Web Server: Windows 2003 64bit (with all current windows updates) any help, ideas, or advice would be greatly appreciated! Cheers, Ian

    Read the article

  • restart of web dev server every time load ASP.NET MVC application

    - by kjm
    Hi, I continously get this problem (stack trace below) when I start my ASP.NET MVC application and have to restart the web dev server and then it goes away. It appears to be happening on when I make modification in my jquery and then try to restart the application. protected void Application_Start() { InitialiseIocContainer(); RegisterViewEngine(ViewEngines.Engines); RegisterRoutes(RouteTable.Routes); SetupLogging(); } It appears to get caugth on the Application_start in global.asax. I've done lots of search in google but no luck. ITS DRIVING ME BONKERS!!!! can anyone help please Server Error in '/' Application. -------------------------------------------------------------------------------- Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401) Source Error: Line 30: RegisterRoutes(RouteTable.Routes); Line 31: SetupLogging(); Line 32: } Line 33: Line 34: private void SetupLogging() Source File: C:\UserData\SourceControl\LLNP4\Trunk\Web\Global.asax.cs Line: 32 Stack Trace: [FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)] LLNP4.MvcApplication.Application_Start() in C:\UserData\SourceControl\LLNP4\Trunk\Web\Global.asax.cs:32

    Read the article

  • Software development metrics and reporting

    - by David M
    I've had some interesting conversations recently about software development metrics, in particular how they can be used in a reasonably large organisation to help development teams work better. I know there have been Stack Overflow questions about which metrics are good to use - like this one, but my question is more about which metrics are useful to which stakeholders, and at what level of aggregation. As an example, my view is that code coverage is a useful metric in the following ways (and maybe others): For a team's own internal use when combined with other measurements. For facilitating/enabling/mentoring teams, where it might be instructive when considered on a team-by-team basis as a trend (e.g. if team A and B have coverage this month of 75 and 50, I'd be more concerned with team A than B if the previous month they'd had 80 and 40). For senior management when presented as an aggregated statistic across a number of teams or a whole department. But I don't think it's useful for senior management to see this on a team-by-team basis, as this encourages artifical attempts to bolster coverage with tests that merely exercise, rather than test, code. I'm in an organisation with a couple of levels in its management hierarchy, but where the vast majority of managers are technically minded and able (with many still getting their hands dirty). Some of the development teams are leading the way in driving towards agile development practices, but others lag, and there is now a serious mandate from the top for this to be the way the organisation works. A couple of us are starting a programme to encourage this. In this sort of an organisation, what sort of metrics do you think are useful, to whom, why, and at what level of aggregation? I don't want people to feel their performance is being assessed based on a metric that they can artificially influence; at the same time, the senior management are going to want some sort of evidence that progress is being made. What advice or caveats can you provide based on experience in your own organisations? EDIT We are definitely wanting to use metrics as a tool for organisational improvement not as a tool for individual performance measurement.

    Read the article

  • Pixel shader wierd compilation error

    - by ytrewq
    hi, I'm experiencing with shaders a bit and I keep getting this weird compilation error that's driving me crazy! the following pixel shader code snippet: DirectionVector = normalize(f3LightPosition[i] - PixelPos); LightVec = PixelNormal - DirectionVector; // Get the light strenght factor LightStrFactor = float(abs((LightVec.x + LightVec.y + LightVec.z) / 3.0f)); // TEST!!! LightStrFactor = 1.0f; // Add this light to the total light on this pixel LightVal += f4Light[i] * LightStrFactor; works perfectly, but as soon as i remove the "LightStrFactor = 1.0f;" line, i.e. letting 'LightStrFactor ' value be the result of the calculation above, it fails to compile the shader. LightStrFactor is a float LightVal & f4Light[i] are float4 All the rest are float3. my question is, besides why it doesn't compile, is how come DX compiler cares about the value of a float? even if my values are incorrect, shouldn't it be run-time? the shader compilation code is this: /* Compile the bitch */ if (FAILED(D3DXCompileShaderFromFile(fileName, NULL, NULL, "PS_MAIN", "ps_2_0", 0, &this->m_pCode, NULL, &this->m_constantTable))) GraphicException("Failed to compile pixel shader!"); // <-- gets here :( if (FAILED(g_D3dDevice->CreatePixelShader( (DWORD*)this->m_pCode->GetBufferPointer(), &this->m_hPixelShader ))) GraphicException("Failed to create pixel shader!"); this->m_fLoaded = true; any help is appreciated thanks!!! :]

    Read the article

  • Why does Cut/Paste of form components sometimes stop working in Delphi 2007 IDE?

    - by robsoft
    This is driving me crazy. I'm not going to take it anymore. I'm going to ask, even at the risk of eternal public humiliation! (If it's something really obvious or that I've done to the system myself). For reasons I've never quite had the patience to work out, every so often the form I'm working on in Delphi 2007's visual form editor goes 'pseudo-read-only'; I can add new components to the form, I can move/resize existing ones (and change any properties in the Object Inspector), and I can select a component and 'copy' it to the clipboard. But I'm completely unable to cut a component from the form, or paste a new copy down. I don't believe it's to do with the 'Lock Controls' Edit menu option as I can toggle this on or off and it has the effect it's supposed to - this disappearance of Cut & Paste happens on the right-click context menu, from the keyboard and from the main Edit menu - it's as if the form has become read only to thing to do with the clipboard. If I close the form in the IDE and then reopen it, everything starts working fine again (just as D1, D3, D5 and D7 always did for me, previously). I'm not going mad, as I'm sure I read something about why this happens on a newsgroup once and it's caught me out from time to time many many times in the last few months, but I've failed to find the newsgroup reference this evening and I've decided that, as more and more Delphi users seem to be making use of StackOverflow, it was worth asking here. Help - when I'm doing lots of form-work it drives me absolutely mad!

    Read the article

  • Weblogic 10.3, JDBC, Oracle, SQL - Table or View does not exist

    - by shelfoo
    Hi, I've got a really odd issue that I've not had any success googling for. It started happening with no changes to the DB, connection settings, code etc. Problem is, when accessing a servlet, one of the EJB's is doing a direct SQL call, very simple "select \n" + " value, \n" + " other_value \n" + " from \n" + " some_table \n" + " where some_condition = ? " That's obviously not the direct SQL, but pretty close. For some reason, this started returning an error stating "ORA-00942: table or view does not exist". The table exists, and the kicker is if I hook in a debugger, change a space or something minor (not changing the query itself) in the query, and hot-deploy the change, it works fine. This isn't the first time I've run across this. It only seems to happen in dev environments (haven't seen it in q/a, sandbox, or production yet), is not always replicable, and driving me seriously insane. By not always replicable I mean that occasionally a clean build & redeploy will sometimes fix the problem, but not always. It's not always the same table (although if the error occurs it continues with the same query). Just throwing a feeler out there to see if anybody has run into issues like this before, and what they may have discovered to fix it.

    Read the article

  • Texture2D problem

    - by Anders Karlsson
    I have a problem that is driving me crazy, I want to write a number of texts on the screen using Texture2D however I only seem to be able to write the first one. If I individually write one of the labels it works but not if I write all of them, only the first label is displayed. Let me show some code: -(void)drawText:(NSString*)theString AtX:(float)X Y:(float)Y withFont:(UIFont*)aFont { // set color glColor4f(1, 0, 0, 1.0); // Enable modes needed for drawing glEnableClientState(GL_TEXTURE_COORD_ARRAY); Texture2D* textTexture = [[Texture2D alloc] initWithString:theString dimensions:viewSize // 320x480 alignment:UITextAlignmentLeft font:aFont]; glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); [textTexture drawInRect:CGRectMake(X,Y,1,1)]; glDisableClientState(GL_TEXTURE_COORD_ARRAY); [textTexture release]; } When I call this drawText once it seems to display the text properly, but if I call it a second time nothing seems to be displayed. Somebody has an idea what it could be? The states like GL_BLEND and GL_TEXTURE_2D have been enabled in the view setup function. In the Texture2D the dimensions are 512x512 as I pass the whole screen to function. If I don't pass that the text gets enlarged and fuzzy. I am a bit uncertain about that parameter. TIA for any help.

    Read the article

  • Migrating to web application with AjaxControlToolkit

    - by Chris
    Hi All, We are currently migrating our ASP.NET website to a web application in Visual Studio 2008. Most of the process has been fairly straight forward, but I have hit one block that is driving me a bit nuts. We are using the AjaxControlToolkit for some functionality, specifically an AutoControlExtender. When this is run locally through VS's development server the extender (dropdown) does not render after the service returns the resultset. However if I deploy the migrated solution to our UAT server the extender functions correctly. I have ensured the Ajax Control Toolkit is properly installed locally on my dev machine (and the dll available in the bin directory), and using debugging have ensured the service is called correctly and runs through without error (which it does). The web application was taken from a server running IIS7. Can anyone confirm if Visual Studio 2008 development server requires a different configuration to IIS 7 (as I believe IIS 6 requires a different configuration to IIS 7), and if there is a resource that provides more info? My own searches have turned up very little in this area. On the other hand, if I am looking in the wrong area any other tips would be appreciated. Thanks Chris

    Read the article

  • Website (jQuery) consistently crashes Internet Explorer (REALLY STUCK!)

    - by Bradley Bell
    Hey Guys. I posted this question yesterday, but haven't had a response. Basically, I'm totally stuck and clueless over crashing in Internet Explorer. The website now works fine in all browsers except internet explorer. The website is heavily reliant on jQuery and as far as I'm aware, I cant spot anything wrong with the script. Internet Explorer displays no errors and I don't know what I can possibly change. It displays fine, which would suggest that its nothing up with the CSS or HTML? I'm fairly sure it has to be the script, because it only crashes when you hover over one of the mouseover links. I'm already over the deadline and time is ticking! Its driving me crazy. I've uploaded it onto a test directory here: www.openyourheart.org.uk/test/index.html (I'll add the script/css links below as a comment, It wont let me post more than one here!) I would reaaly, really appreciate any help on this. I can also send the website compressed and post scripts here if required/preferred. Thanks in advance, Bradley

    Read the article

  • Serious Application Error

    - by Garry
    I have a TableView controller class that uses a fetched results controller to display a list of 'patient' entities taken from a Core Data model. The sections of this table are taken from a patient attribute called 'location'. Here is the sort descriptor for the fetch request: NSSortDescriptor *locationDescriptor = [[NSSortDescriptor alloc] initWithKey:@"location" ascending:YES]; NSSortDescriptor *lastNameDescriptor = [[NSSortDescriptor alloc] initWithKey:@"lastName" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:locationDescriptor, lastNameDescriptor, nil]; Here is the initialisation code for the FRC: NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:@"location" cacheName:@"List"]; When I want to add a new 'patient' entity - I click an add button which then pushes an 'add new patient' view controller to the navigation stack. The first patient I add works fine. If I add a second patient - the app will sometimes crash with the following error: 2010-03-22 14:42:05.270 Patients[1126:207] Serious application error. Exception was caught during Core Data change processing: * -[NSCFArray insertObject:atIndex:]: index (1) beyond bounds (1) with userInfo (null) 2010-03-22 14:42:05.272 Patients[1126:207] Terminating app due to uncaught exception 'NSRangeException', reason: '** -[NSCFArray insertObject:atIndex:]: index (1) beyond bounds (1)' This only seems to happen if the patient's have a location added (if none is added then the location defaults to 'unknown'). It seems to have something to do with the sorting of the location too. For instance, if the first patient location = ward 14 and the second = ward 9 then it crashes without fail. I'm wondering if this is something to do with how I am asking the fetched results controller to sort the section names?? This bug is driving me nuts and I just can't figure it out. Any help would be greatly appreciated!

    Read the article

  • undefined method `user_sessions_path' for #<ActionView::Base:0xdb3158>

    - by mrbernz
    I'm getting this error that's driving me up the wall. I don't see what's going on... I've followed instructions to the T and it's still complaining - help please!! I've got extracts of the error message, controller file, login page and routes file. Error message NoMethodError in User_sessions#new Showing app/views/user_sessions/new.html.erb where line #4 raised: undefined method `user_sessions_path' for # Extracted source (around line #4): 1: 2: User Login 3: 4: <% form_for @user_session do |f| % 5: <%= f.error_messages % 6: 7: controller/user_sessions_controller.rb class UserSessionsController < ApplicationController before_filter :require_no_user, :only = [:new, :create] before_filter :require_user, :only = :destroy def new @user_session = UserSession.new end def create @user_session = UserSession.new(params[:user_session]) if @user_session.save flash[:notice] = "Login successful!" redirect_to root_url #redirect_back_or_default account_url else render :action = :new end end def destroy current_user_session.destroy flash[:notice] = "Logout successful!" redirect_to root_url #redirect_back_or_default account_url end end user_sessions/new.html.erb User Login <% form_for @user_session do |f| % <%= f.error_messages % <%= f.label :Email % <%= f.text_field :email % <%= f.label :Password % <%= f.password_field :password % <%= f.submit "Submit" % <% end % routes.rb file ActionController::Routing::Routes.draw do |map| map.login "login", :controller = "user_sessions", :action = "new" Am I look in in the wrong place??

    Read the article

  • d:DesignData issue, Visual Studio 2010 cant build after adding sample design data with Expression Bl

    - by Valko
    Hi, VS 2010 solution and Silverlight project builds fine, then: I open MyView.xaml view in Expression Blend 4 Add sample data from class (I use my class defined in the same project) after I add new sample design data with Expression blend 4, everything looks fine, you see the added sample data in the EB 4 fine, you also see the data in VS 2010 designer too. Close the EB 4, and next VS 2010 build is giving me this errors: Error 7 XAML Namespace http://schemas.microsoft.com/expression/blend/2008 is not resolved. C:\Code\source\...myview.xaml and: Error 12 Object reference not set to an instance of an object. ... TestSampleData.xaml when I open the TestSampleData.xaml I see that namespace for my class used to define sample data is not recognized. However this namespace and the class itself exist in the same project! If I remove the design data from the MyView.xaml: d:DataContext="{d:DesignData /SampleData/TestSampleData.xaml}" it builds fine and the namespace in TestSampleData.xaml is recognized this time?? and then if add: d:DataContext="{d:DesignData /SampleData/TestSampleData.xaml}" I again see in the VS 2010 designer sample data, but the next build fails and again I see studio cant find the namespace in my TestSampleData.xaml containing sample data. That cycle is driving me crazy. Am I missing something here, is it not possible to have your class defining sample design data in the same project you have the MyView.xaml view?? cheers Valko

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >