Daily Archives

Articles indexed Monday May 17 2010

Page 5/112 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to create markers on a google local search api?

    - by cheesebunz
    As the question says, i do not want to use it from the API, and instead combine it on my code, but i can't seem to implement it with the code i have now. the markers do not come out and the search completely disappears if i try implementing with the code. This is a section of my codings : http://www.mediafire.com/?0minqxgwzmx

    Read the article

  • Iterating through controls on a Windows Form

    - by icemanind
    I seem to have some weird issue going on that I am sure will turn out to be a simple thing. I have a Windows Form and on the form I have 1 panel called MainPanel and inside MainPanel, I got another panel with a button inside and a label that is inside MainPanel, but not in the second panel. 2 controls. What I am trying to do is copy all the controls inside MainPanel over to another panel object. I am using the following C# code to do this: GUIPanel gp = new GUIPanel(); foreach (System.Windows.Forms.Control ctrl in gp.Controls["MainPanel"].Controls) { m_OptionsControl.Controls.Add(ctrl); } When I run this code, it copies over the panel with the button, but not the label. What's even more odd is when I set a breakpoint and run it through the debugger, and I type "?gp.Controls["MainPanel"].Controls.Count" in the immediate window, it returns 2, just like it should. However, when stepping through the code, it only executes the foreach loop once. What am I missing here?

    Read the article

  • boost::spirit::real_p some how round ups the value.

    - by rkbang
    Hello all, I am using the boost::spirit parser. At one point when I use real_p, the value coming out of the parser stack is 38672000 instead of the actual value, 386731500. Some how it is considering it as a float value, I think. Is there anyway to fix this? Do I need to set the precision of real_p, or am using real_p in the wrong context?

    Read the article

  • remove multiple training slashes mod_rewrite

    - by Boyan
    I know this question was asked a number of times on this site alone, but browsing through the relevant posts I couldn't find a solution. Trying to remove multiple trailing slashes after domain. The following mod_rewrite expressions seem to work for URLs such as http://www.domain.com//path1///path2////, but do not work for domain// DirectorySlash Off RewriteEngine on # Canonical fix RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301] RewriteRule ^/main.do http://www.domain.com/ [R=301,L] RewriteRule ^/index.jsp http://www.domain.com/ [R=301,L] # Remove bogus query strings RewriteCond %{query_string} q= [NC] RewriteRule (.*) http://www.domain.com/$1? [R=301,L] # Remove multiple slashes after domain - DOESN'T WORK!!! #RewriteCond %{REQUEST_URI} ^//+(.*)$ [OR] #RewriteCond %{REQUEST_URI} ^(.*/)/+$ #RewriteRule / http://www.domain.com/%1 [R=301,L] # Remove multiple slashes anywhere in URL RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] # Externally redirect to get rid of trailing slash except for home page, ads RewriteCond %{REQUEST_URI} !^/ads/ RewriteRule ^(.+)/$ $1 [R=301,L] Your help is appreciated.

    Read the article

  • Looking for help with a design for a simple C# calendar app.

    - by Vladislav
    As a personal project, I'm putting together a C# WPF calendar. I'm stuck on coding the calendar screen - specifically, the 5x7 grid of days. I've first tried to code it using elements like Panels, Labels, and Buttons. I've decided that was too cumbersome. I've then decided to use GDI to draw the calendar myself. I now have a wonderful layout - but I'm not sure how to handle interactive regions of the calendar. (Say, Previous/Next month, clicking on any particular day...) After rendering the calendar screen, should I be creating button objects for all those tasks, and assigning onClick handlers to them? Or is there an alternative solution? Thanks in advance. -Vladislav

    Read the article

  • SAPI Speech recognition delphi

    - by XBasic3000
    I need create a programatic equivalent using delphi language... or could someone post a link on how to do grammars in peech recogniton using the delphi. sorry for my english... **Programmatic Equivalent C#:** Ref: http://msdn.microsoft.com/en-us/library/ms723634(v=VS.85).aspx To add a phrase to a rule, SAPI provides an API called ISpGrammarBuilder::AddWordTransition. The application developer can add the sentences as follows: SPSTATEHANDLE hsHelloWorld; // Create new top-level rule called "HelloWorld" hr = cpRecoGrammar->GetRule(L"HelloWorld", NULL, SPRAF_TopLevel | SPRAF_Active, TRUE, &hsHelloWorld); // Check hr // Add the command words "hello world" // Note that the lexical delimiter is " ", a space character. // By using a space delimiter, the entire phrase can be added // in one method call hr = cpRecoGrammar->AddWordTransition(hsHelloWorld, NULL, L"hello world", L" ", SPWT_LEXICAL, NULL, NULL); // Check hr // Add the command words "hiya there" // Note that the lexical delimiter is "|", a pipe character. // By using a pipe delimiter, the entire phrase can be added // in one method call hr = cpRecoGrammar->AddWordTransition(hsHelloWorld, NULL, L"hiya|there", L"|", SPWT_LEXICAL, NULL, NULL); // Check hr // save/commit changes hr = cpRecoGrammar->Commit(NULL); // Check hr XML Grammar Sample(s): <GRAMMAR> <!-- Create a simple "hello world" rule --> <RULE NAME="HelloWorld" TOPLEVEL="ACTIVE"> <P>hello world</P> </RULE> <!-- Create a more advanced "hello world" rule that changes the display form. When the user says "hello world" the display text will be "Hiya there!" --> <RULE NAME="HelloWorld_Disp" TOPLEVEL="ACTIVE"> <P DISP="Hiya there!">hello world</P> </RULE> <!-- Create a rule that changes the pronunciation and the display form of the phrase. When the user says "eh" the display text will be "I don't understand?". Note the user didn't say "huh". The pronunciation for "what" is specific to this phrase tag and is not changed for the user or application lexicon, or even other instances of "what" in the grammar --> <RULE NAME="Question_Pron" TOPLEVEL="ACTIVE"> <P DISP="I don't understand" PRON="eh">what</P> </RULE> <!-- Create a rule demonstrating repetition --> <!-- the rule will only be recognized if the user says "hey diddle diddle" --> <RULE NAME="NurseryRhyme" TOPLEVEL="ACTIVE"> <P>hey</P> <P MIN="2" MAX="2">diddle</P> </RULE> <!-- Create a list with variable phrase weights --> <!-- If the user says similar phrases, the recognizer will use the weights to pick a match --> <RULE NAME="UseWeights" TOPLEVEL="ACTIVE"> <LIST> <!-- Note the higher likelihood that the user is expected to say "recognizer speech" --> <P WEIGHT=".95">recognize speech</P> <P WEIGHT=".05">wreck a nice beach</P> </LIST> </RULE> <!-- Create a phrase with an attached semantic property --> <!-- Speaking "one two three" will return three different unique semantic properties, with different names, and different values --> <RULE NAME="UseProps" TOPLEVEL="ACTIVE"> <!-- named property, without value --> <P PROPNAME="NOVALUE">one</P> <!-- named property, with numeric value --> <P PROPNAME="NUMBER" VAL="2">two</P> <!-- named property, with string value --> <P PROPNAME="STRING" VALSTR="three">three</P> </RULE> </GRAMMAR>

    Read the article

  • Unable to connect SQL Server instance from Visual Studio 2008 SP1 on Vista x64

    - by Shimmy
    Hi folks! I installed on a Vista x64 machine Visual Studio 2008 SP1 (with integrated SQL from the installation package) and when I try to add an MDF file to a project or to the App_Data when working with web, I get the following message: Connections to SQL Server Files (*.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URl: http:go.microsoft.com/fwlink/?linkID=49251. Just to make sure: SQL 2005 express is installed and I connect to it via SSMS. Update: I am 90% sure that this is a Microsoft bug with x64 machines.

    Read the article

  • How do I reset an USB device without unplugging it in Linux?

    - by Grumbel
    Every now and then there might come a need to reset a USB device, is there a way to perform the reset in software without unplugging the device itself and the pluggin it back in? More specifically I have a webcam which gets confused when playing to much with the settings in guvcapture and then needs a reset to get back on track.

    Read the article

  • SQLAuthority News – Bookmark – Deprecated Database Engine Features in SQL Server 2008

    - by pinaldave
    When anybody asked me if any specific feature is available in SQL Server 2008 or if any feature will be disabled in future versions of SQL Server, I always point everybody to following list where all the deprecated database engine features are listed. Deprecated Database Engine Features in SQL Server 2008 R2 Deprecated Database Engine Features in SQL Server 2008 This list is quite helpful and everybody should refer it once. This list has many important details. For example, it suggests “80 compatibility level and upgrade from version 80.” will not be supported in next version of SQL Server. If you are using SQL Server 2000 still today (by any chance) you will be not able to upgrade that to next version of SQL Server directly. It is very important to note that if you are using any feature of SQL Server in compatibility mode and if you find them in the list above. You need to start working on the replacement suggested in article. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Bookmark, SQL, SQL Authority, SQL Documentation, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology

    Read the article

  • How to check duplicates for 5 textfields with PHP?

    - by jl
    Hi, I have 5 textfields for user input in a form namely: username1, username2, username3, username4 and username5 I would like to know how should I write my php code such that I will be able to check if there is any duplicates between the 5 textfields during POST? I can only think of comparing (username1 !== username2) and so on, but I think there should be simpler way to do it right? How should I be able to do it? Thank you very much.

    Read the article

  • NHibernate slow mapping

    - by Rob A
    My question is what can I do to determine the cause of the slowness, or what can I do to speed it up without knowing the exact cause. I am running a simple query and it appears that the mapping back to the entities is taking taking forever. The result set is 350, which is not much data in my opinion. IRepository repo = ObjectFactory.GetInstance<IRepository>(); var q = repo.Query<Order>(item => item.Ordereddate > DateTime.Now.AddDays(-40)); foreach (var order in q) { Console.WriteLine(order.TransactionNumber); } The profiler is telling me it is executing the query 7ms / 35257ms, I am assuming that the former is the actual response from the db and the latter is the time it takes NH to do it's magic. 35 seconds is too long. This is a simple mapping, one table, nested components, using fluent interface to do mappings. I just start up a simple console app and run the one query, the slowness is measured after the SessionFactory is initialized, there should only be one session, and I am not using a transaction. Thanks

    Read the article

  • Rails: Check output of path helper from console

    - by Thor Thurn
    Rails defines a bunch of magic with named routes that make helpers for your routes. Sometimes, especially with nested routes, it can get a little confusing to keep track of what URL you'll get for a given route helper method call. Is it possible to, using the Ruby console, see what link a given helper function will generate? For example, given a named helper like post_path(post) I want to see what URL is generated.

    Read the article

  • Magento connect manager problem

    - by itsandy
    Hi all, I am new to magento and have started using it recently. I just installed a theme from siteground and after installing it from magneto connect manager when i try going back to admin page to make other changes it doesnt lets me go. Neither I can visit the frontend. It's taking me to localhost:8081/magento/downloader Has anyone faced the same problem or know how to fix this.Please help. Thanks

    Read the article

  • Wrapping text around a figure in LaTeX

    - by manapo
    When I wrap my text around a figure I cannot get it to wrap around the correct text. Basically, I want to have the text in the section the figure is in wrap around it, but when I compile it my figure ends up being farther down the page next to text in another section. 1. How do I change this? 2. (kind of a minor point) How do I make the label for the caption, such as "Figure 1.", bold? \usepackage{graphicx} \usepackage{wrapfig} ... \begin{wrapfigure}{r}{40mm} \begin{center} \includegraphics[scale=0.5]{image} \end{center} \caption{This is the image.} \end{wrapfigure}

    Read the article

  • Rotate a feature Image in Open Layers - Javascript variable from JSON.

    - by Ozaki
    I have an open layers map. It adds and removes my "imageFeature" every 10secs or so. I have a JSON feed that gives me the rotation that I need, I have a request to get that rotation and set it as a variable of rotationv. Everything works but the fact when the image is recreated it does not update the rotation. My code is as follows: JSON request: var rotationv = (function () { rotationv = null; $.ajax({ 'async': false, 'global': true, 'url': urldefault, 'dataType': "json", 'success': function (data) { rotationv = data.rotation; } }); return rotationv })(); Creating image feature: imageFeature = new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(mylon, mylat), { rotation: rotationv } ); The image is set in the styling elsewhere. Why does this not rotate my image? Debugging with firebug I now notice that "rotationv" is updating as per it should be. But when the point is destroyed then added again it does not apply the new rotation... Add: I realised that the "image" is applied as per the layer. So I need to figure out how to re apply the stylemap to the layer so it will trigger the "update" on the page. //redefine layer 2 so it can be updated// //test.js is just a 0.0 testref// var layer2 = new OpenLayers.Layer.GML("Layer 2", "test.js", { format: OpenLayers.Format.GeoJSON, styleMap: styleMap }); But even if I add the above into my function still no luck. Included map.addLayers([layer2]); into the function as well.

    Read the article

  • Detecting Xml namespace fast

    - by Anna Tjsoken
    Hello there, This may be a very trivial problem I'm trying to solve, but I'm sure there's a better way of doing it. So please go easy on me. I have a bunch of XSD files that are internal to our application, we have about 20-30 Xml files that implement datasets based off those XSDs. Some Xml files are small (<100Kb), others are about 3-4Mb with a few being over 10Mb. I need to find a way of working out what namespace these Xml files are in order to provide (something like) intellisense based off the XSD. The implementation of this is not an issue - another developer has written the code for this. But I'm not sure the best (and fastest!) way of detecting the namespace is without the use of XmlDocument (which does a full parse). I'm using C# 3.5 and the documents come through as a Stream (some are remote files). All the files are *.xml (I can detect if it was extension based) but unfortunately the Xml namespace is the only way. Right now I've tried XmlDocument but I've found it to be innefficient and slow as the larger documents are awaiting to be parsed (even the 100Kb docs). public string GetNamespaceForDocument(Stream document); Something like the above is my method signature - overloads include string for "content". Would a RegEx (compiled) pattern be good? How does Visual Studio manage this so efficiently? Another college has told me to find a fast Xml parser in C/C++, parse the content and have a stub that gives back the namespace as its slower in .NET, is this a good idea?

    Read the article

  • WM6.5 - C# - Check if Start Menu is Visible

    - by Nullstr1ng
    Hi guys, I'm developing an Windows Mobile 6.5 start menu replacement called JWMD Stuick. Currently, I'm able to detect if the Start Menu is created or destroyed by checking GetWindowLong() API.. Though this does not guarantee if Start Menu is visible or not because other cooked ROM was even if the Start Menu is closed or an app was executed from Start Menu -- the Start Menu GWL still has value. Do guys have better ways or ideas how to check if Start Menu is Visible? Thanks.

    Read the article

  • iphone Three20 TTNavigator UITabbarController

    - by Ward
    Not sure if what I want to do makes sense, but I want to take advantage of the UITabBarController and the TTNavigator from Three20. Any tutorials around that demonstrate how this can be done? I understand how to add view controllers to the navigator using the TTURLMap, but do I need to add a navigator for each tabbar item? I'm lost.

    Read the article

  • Reccomendation for tuning 100's of Sql Databases

    - by wayne
    Hi, I'm running several sql servers, each running a few hundred multi gig databases for customers. They are all setup homogeneously as far as the schemas are concerned, however customer usages of the data differ quite alot from database to database. What would be the best way to auto-index / profile / tune this large amount of databases? As there are atleast 600 or more catalogs i cant have someone manually profile, and index as required by each databases usage patterns. I'm currently running SQL 2005 but will be moving to 2008, so solutions that work with either are fine!

    Read the article

  • Automate creation of Windows startup script?

    - by Niten
    Is there a good way to automate installing local startup (rather than login) scripts in Windows XP and Windows 7, via the command line, WMI, or otherwise (even COM or Win32 if it comes to that)? I need to setup a local startup script on a large number of computers, and unfortunately, Active Directory is absolutely not an option. I would like to write a script or small program that I can run on each computer to perform the startup script installation in order to save myself a lot of error-prone point-and-click manual labor. I see that when one uses gpedit.msc to create a local startup script, information about the script gets stored in the registry here: HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup However, if you create such a script and then delete its registry key, the script will remain listed in the local Group Policy editor; as is so often the case in Windows, apparently there is more going on there than meets the eye. This leads me to question whether it's safe to manually add subkeys for new startup scripts here (I wouldn't want my script to be overwritten by later changes made using the local Group Policy editor, for instance)... Another option that's occurred to me is to create an item in the Task Scheduler configured to run at system startup. However, my concerns there are twofold: Can this be automated any more easily? For instance, the at command doesn't appear to let you schedule a task for system startup, and WMI's Win32_ScheduledJob interface looks unreliable (it fails to show any of my currently scheduled tasks, for one thing). Would I be able to prevent users from logging in until the scheduled startup task is completed, as can be done with "normal" Windows startup scripts? Thanks in advance for any suggestions, I've been banging my head against this one for a bit...

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >