Daily Archives

Articles indexed Sunday January 9 2011

Page 20/29 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • Boost: Although compiled, missing lib

    - by Jonathan
    I've compiled Boost and am using it in a Visual C++ project. At some point, I started getting the following error: 1>LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc100-mt-sgd-1_45.lib' AFAIK I have the linker configuration set correctly. I've searched for the lib and the closest I found was: libboost_filesystem-vc100-mt-gd-1_45.lib (Notice the missing 's') What does the missing 's' represent? What do these similar yet different libs stand for? How come I'm missing it although I've compiled all of Boost?

    Read the article

  • Exclude subdirectory from rewrite rule in web.config

    - by Clog
    This question comes up often, but I can only find solutions for PHP, Apache, htaccess etc but not for web.config I would like my pages to return in HTTP not HTTPS, except for forms within certain subdirectories. I have created the following web.config file, but how do I exclude a subdirectory called forms. <configuration> <system.webServer> <rewrite> <rules> <rule name="Force all to HTTP" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="on" ignoreCase="true" /> </conditions> <action type="Redirect" redirectType="Found" url="http://www.mysite.com/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration> Many thanks all you clever clogs.

    Read the article

  • Watin; Get element by id not working

    - by Afnan
    I am trying to place data into text area that is inside hiden input but watin dose not find it.why? but when i search for inputs my program shows this. var ie = new WatiN.Core.IE("http://facebook.com", true); ie.ClearCookies(); ie.TextField(WatiN.Core.Find.ById("email")).TypeText(textBoxUsername.Text); ie.TextField(WatiN.Core.Find.ById("pass")).TypeText(textBoxPassword.Text); ie.Button(WatiN.Core.Find.ByValue("Login")).Click(); ie.Link(WatiN.Core.Find.ByText("Status")).Click(); ie.TextField(WatiN.Core.Find.ById("u362110_11")).TypeText(textBoxPassword.Text); Exception Could not find INPUT (hidden) or INPUT (password) or INPUT (text) or INPUT (textarea) or TEXTAREA element tag matching criteria: Attribute 'id' equals 'u493403_13' at http://www.facebook.com/home.php

    Read the article

  • How do I compare two PropertyInfos or methods reliably?

    - by Rob Ashton
    Same for methods too: I am given two instances of PropertyInfo or methods which have been extracted from the class they sit on via GetProperty or GetMember etc, (or from a MemberExpression maybe). I want to determine if they are in fact referring to the same Property or the same Method so (propertyOne == propertyTwo) or (methodOne == methodTwo) Clearly that isn't going to actually work, you might be looking at the same property, but it might have been extracted from different levels of the class hierarchy (in which case generally, propertyOne != propertyTwo) Of course, I could look at DeclaringType, and re-request the property, but this starts getting a bit confusing when you start thinking about Properties/Methods declared on interfaces and implemented on classes Properties/Methods declared on a base class (virtually) and overridden on derived classes Properties/Methods declared on a base class, overridden with 'new' (in IL world this is nothing special iirc) At the end of the day, I just want to be able to do an intelligent equality check between two properties or two methods, I'm 80% sure that the above bullet points don't cover all of the edge cases, and while I could just sit down, write a bunch of tests and start playing about, I'm well aware that my low level knowledge of how these concepts are actually implemented is not excellent, and I'm hoping this is an already answered topic and I just suck at searching. The best answer would give me a couple of methods that achieve the above, explaining what edge cases have been taken care of and why :-)

    Read the article

  • EF4 + STE: Reattaching via a WCF Service? Using a new objectcontext each and every time?

    - by Martin
    Hi there, I am planning to use WCF (not ria) in conjunction with Entity Framework 4 and STE (Self tracking entitites). If i understnad this correctly my WCF should return an entity or collection of entities (using LIST for example and not IQueryable) to the client (in my case silverlight) The client then can change the entity or update it. At this point i believe it is self tracking???? This is where i sort of get a bit confused as there are a lot of reported problems with STEs not tracking.. Anyway... Then to update i just need to send back the entity to my WCF service on another method to do the update. I should be creating a new OBJECTCONTEXT everytime? In every method? If i am creaitng a new objectcontext everytime in everymethod on my WCF then don't i need to re-attach the STE to the objectcontext? So basically this alone wouldn't work?? using(var ctx = new MyContext()) { ctx.Orders.ApplyChanges(order); ctx.SaveChanges(); } Or should i be creating the object context once in the constructor of the WCF service so that 1 call and every additional call using the same wcf instance uses the same objectcontext? I could create and destroy the wcf service in each method call from the client - hence creating in effect a new objectcontext each time. I understand that it isn't a good idea to keep the objectcontext alive for very long. Any insight or information would be gratefully appreciated thanks

    Read the article

  • Redirect Log output to sdcard on customer's phone

    - by Tom
    My customers are having a problem with my app, and I have been unable to reproduce the problem on my development phone. How to debug this problem? The android Log class is great, but my customers do not know how to use 'adb' or the USB debug cable. Is there some way to redirect Log output to a file on the phone's SD card? Then the customer could easily email the log file to me. Even if this redirection requires programming on my part, I could at least distribute a 'debug' version of the app. Thanks, Tom

    Read the article

  • Xml add element node using PHP

    - by user560411
    Hello I would like to add an element node in my entire XML file using PHP. I can not get it right and I add it below root. Please share me a clean code so that I understand how it works.. Thank you! My xml is <?xml version="1.0" encoding="utf-8"?> <GameStore> <Game type="adventure"> <TITLE>Assassin's Creed: Brotherhood</TITLE> <PUBLISHER>Ubisoft</PUBLISHER> </Game> <Game type="adventure"> <TITLE>Batman: Arkham Asylum</TITLE> <PUBLISHER>Eidos</PUBLISHER> </Game> </GameStore>

    Read the article

  • Select a certain amount of checkbox arrays on the page

    - by Joris Tobebech
    Hi guys, so i wrote a function to select a certain amount of checkboxes on the page, the number retrieves fine when i message box it but no checkboxes are checked. here is my function function checkAmount(number) { alert(number); var boxes = document.getElementsByTagName("input"); for (var i = 0; i < number; i++) { if (boxes[i].name == "vote[]") { boxes[i].checked = true; } } } and here is my execution code OnClick="checkAmount(document.getElementById(\'ammount\').value)"

    Read the article

  • Help using Lisp debugger

    - by Joel
    I'm trying understand how to interpret the output of, and use, the Lisp debugger. I've got a pretty simple Backtrace for the evaluation of my function, but I cann't seem to work out how to use it to find out in which Lisp 'form' in my function the exception occurred. I'd appreciate any clues as to what I should be doing, to find the source of the error. I've attached a screen shot (if it's too small to read I can re-post it in parts), with the debug output, the function and the repl (please ignore my very wrong function, I'm just interested in learning how to use the debugger properly). In addition, I hit 'v' on the first frame to go to the source, but this resulted in the error at the bottom of the screen.

    Read the article

  • PrimeFaces commandButton doesn't navigate or update

    - by Sven
    I'am using Primefaces to make my app a little bit more beautiful. I noticed that p:commandButton and h:commandButton don't work the same way. The p:commandButton calls the method and nothing else hapens. The h:commandButton calls the method and returns a navigation. I have got trouble with redirecting after pressing the login button when using p:commandButton. How to deal with that? I do have an update parameter: <p:commandButton value="Login" action="#{login.login}" type="submit" update="msgs" />

    Read the article

  • Strange hex formatting in NSString

    - by pseudopeach
    Try this: unsigned long long int N; = 23229877463LL; NSString* s = [NSString stringWithFormat:@"dec:%qi, hex:%qX",N,N]; NSLog(@"output: %@",s); output: dec:23229877460, hex:689BCCD400000005 What's up with the 00000005??? In mySQL, hex(23229877460) = 5689BCCD4. Also, every other language seems to do this correctly. A 16 digit long hex is like 4 gazillion (16^16), right? How can I get objective-c to format hex numbers that other languages can understand?

    Read the article

  • Simaltaneous connections with PHP and SOAP?

    - by Dov
    I'm new to using SOAP and understanding the utmost basics of it. I create a client resource/connection, I then run some queries in a loop and I'm done. The issue I am having is when I increase the iterations of the loop, ie: from 100 to 1000, it seems to run out of memory and drops an internal server error. How could I possibly run either a) multiple simaltaneous connections or b) create a connection, 100 iterations, close connection, create connection.. etc. "a)" looks to be the better option but I have no clue as to how to get it up and running whilst keeping memory (I assume opening and closing connections) at a minimum. Thanks in advance! index.php <?php // set loops to 0 $loops = 0; // connection credentials and settings $location = 'https://theconsole.com/'; $wsdl = $location.'?wsdl'; $username = 'user'; $password = 'pass'; // include the console and client classes include "class_console.php"; include "class_client.php"; // create a client resource / connection $client = new Client($location, $wsdl, $username, $password); while ($loops <= 100) { $dostuff; } ?> class_console.php <?php class Console { // the connection resource private $connection = NULL; /** * When this object is instantiated a connection will be made to the console */ public function __construct($location, $wsdl, $username, $password, $proxyHost = NULL, $proxyPort = NULL) { if(is_null($proxyHost) || is_null($proxyPort)) $connection = new SoapClient($wsdl, array('login' => $username, 'password' => $password)); else $connection = new SoapClient($wsdl, array('login' => $username, 'password' => $password, 'proxy_host' => $proxyHost, 'proxy_port' => $proxyPort)); $connection->__setLocation($location); $this->connection = $connection; return $this->connection; } /** * Will print any type of data to screen, where supported by print_r * * @param $var - The data to print to screen * @return $this->connection - The connection resource **/ public function screen($var) { print '<pre>'; print_r($var); print '</pre>'; return $this->connection; } /** * Returns a server / connection resource * * @return $this->connection - The connection resource */ public function srv() { return $this->connection; } } ?>

    Read the article

  • Select rows in random order and then reverse it

    - by Faruz
    I need to select rows in random order and return a query which holds the rows in both regular order and in reverse order. This is done to simulate a fantasy draft for a basketball game I'm working on. For example, I need a result set as followed: team1 1 team2 2 team6 3 team9 4 team9 5 team6 6 team2 7 team1 8 As you can see, the first four teams are random then then following four are in reverse order. Hope I managed to explain the problem, if not - please comment and I'll explain further.

    Read the article

  • What's the name of the storage paradigm that uses cubes subdivided into 8 smaller cubes ad infinitum?

    - by Eric
    If I have a cube divided into 8 smaller cubes, each of which may be subdivided into a further 8 cubes, ad infinitum, what is the name of my system? I know that it's a special case of a tree, where each brance contains exactly 8 other leaves/branches. I remember the name starting with "Oct", and there was a wikipedia article on it, but I honestly can't find it! Does anyone know what such a data structure is actually known as?

    Read the article

  • translate a PHP $string using google translator API

    - by Toni Michel Caubet
    hey there! been google'ing for a while how is the best way to translate with google translator in PHP, found very different ways converting URLS, or using Js but i want to do it only with php (or with a very simple solution JS/JQUery) example: //hopefully with $from_lan and $to_lan being like 'en','de', .. or similar function translate($from_lan, $to_lan, $text){ // do return $translated_text; } can you give me a clue? or maybe you already have this function.. my intention it's to use it only for the languages i have not already defined (or keys i haven't defined), that's why i wan it so simple, will be only temporal.. EDIT thanks for your replies we are now trying this soulutions: function auto_translate($from_lan, $to_lan, $text){ // do $json = json_decode(file_get_contents('https://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=' . urlencode($text) . '&langpair=' . $from_lan . '|' . $to_lan)); $translated_text = $json->responseData->translatedText; return $translated_text; } (there was a extra 'g' on variables for lang... anyway) it returns: works now :) i don't really understand much the function, so any idea why is not acepting the object? (now i do) OR: unction auto_translate($from_lan, $to_lan, $text){ // do // $json = json_decode(file_get_contents('https://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=' . urlencode($text) . '&langpair=' . $from_lan . '|' . $to_lan)); // $translated_text = $json['responseData']['translatedText']; error_reporting(1); require_once('GTranslate.php'); try{ $gt = new Gtranslate(); $translated_text = $gt-english_to_german($text); } catch (GTranslateException $ge) { $translated_text= $ge->getMessage(); } return $translated_text; } And this one looks great but it doesn't even gives me an error, the page won't load (error_report(1) :S) thanks in advance!

    Read the article

  • for loop vs while loop

    - by Atul
    We can use for loop and while loop for same purpose. in what means they effect our code if I use for instead of while? same question arises between if-else and switch-case? how to decide what to use? for example which one you would prefer? This code: int main() { int n; cin>>n; for(int i=0;i<n;i++) { do_something(); } return 0; } Or this code: int main() { int n,i=0; cin>>n; while(i<n) { do_something(); i++; } return 0; } if using for or while loop does not effect the code by any means then may I know What was the need to make 2 solution for same problem?

    Read the article

  • Which directive could make apache/rewrite redirect products/ to products.php

    - by Fernando
    Hello, I am having a trouble with two different apache servers. They are 2.2.x, so minor version is different. At both of them i have the same php application with this .htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] My issue is that in server A, when i access products/ it redirects me to products.php. While in server B, when i access products/ it redirects me to index.php. This is the correct and wanted behavior. As the modrewrite rules are equal in both servers, any ideas of other directives that could be causing this problem? Thanks!

    Read the article

  • Weird cyrillic characters behavior after uploading to Ubuntu production server

    - by maxt3r
    When i upload my rails app via SFTP to production server which is running Ubuntu 10.04 LTS all cyrillic characters in my files look like this: http://dl.dropbox.com/u/347209/chars.png As you can see, only parts of words are broken. And because of this rails app doesn't start with syntax error. Also i'm getting errors like ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8)

    Read the article

  • Ubuntu shutdown hook?

    - by ???
    I want to check 10+ local Git repositories if they have any unpushed commit, before shutdown. (I always forgot to push them, so later, the next morning I came office and back home again) I think maybe the shutdown process can check some conditions to meet, if any condition is not met, then give the user the choice to continue to shutdown or just cancel. Then, I can write something to hook the shutdown to check my Git repository to push.

    Read the article

  • How many connections are allowed to a Windows 7 Home Premium shared folder or printer?

    - by lcbrevard
    I have a client who runs a small business with 4 desktop systems, two of which are inexpensive [ The XP Pro system is currently being used as a file "server" for time sheets and QuickBooks data. It also shares an HP ink jet printer. The client wishes to decommission this system because (1) it's ugly [it is] and (2) it uses too much power [it does]. If we share a folder on one of the Windows 7 Home Premium systems will there be a problem connecting to it with up to 3 other computers? What about the printer sharing? I vaguely remember seeing that Windows 7 is less usable for "server" purposes and has severe restrictions on the number of clients. But I cannot seem to find those numbers. In my own network (over 12 systems) we have no problem sharing from Windows 7 Ultimate to a few other systems where needed. I am embarrassed that I cannot seem to find the answer to this in a couple of days of searching. I can do an anytime upgrade of one of these systems to Pro if that would improve the ability to share from it. I am not able to convince the client to put a "real server" into their network.

    Read the article

  • Windows script to copy some text to the clipboard ?

    - by Sebastien
    I am using an application that requires several attempts to log in (because of overloaded servers). This app has no "remember my password" feature. Therefore, I would like to make a script (preferably a .bat script), that would first copy my password into the clipboard -so that I don't have to retype my password on every log on attempt- , then launch the application (easy part) Is this possible with a MS-DOS command ? Do I need a little exe or another script language ? I'm obviously looking for the quickest solution to implement. Thanks in advance for your ideas

    Read the article

  • Simple electric DC question. Currency consumption

    - by Bobb
    Suppose you have DC power supply and a consumer connected to it (i.e. computer PSU and a hard drive). Suppose PSU which was supplied with the consumer has output 5V 1A. So I assume that the consumer should not consume more than 1A. Suppose the original PSU is broken now and I want to replace it with the one I have which is 5V 10A. My guess is that current is something which depends on the consumer. So if the consumer consumes normally 1A then it will not consume more than that even if it is connected to 10A PSU. In other word - am I right assuming that the consumer will not burn out being connected to a power supply with higher current output? P.S. my understanding is that voltage is something independent from the consumer. If you give it higher voltage it will burn (voltage is from PSU to the consumer). However current must be in opposite - consumer sucks as much current as it need not as much as PSU can provide (of course given that max PSU current is greater than the consumer needs)

    Read the article

  • Can't the NetworkManager applet to appear in the Gnome panel in Ubuntu

    - by Nate
    I have researched this problem extensively and I can't seem to find an answer. In Ubuntu 10.04 LTS, I want to connect to my VPN through the NetworkManager applet. I installed all the network manager packages, including the gnome client. I understand I need to add the "Notification Area" to the panel, which I have done. I checked that the NetworkManager is running: nate@nate-desktop:~$ service network-manager status network-manager start/running, process 763 In /etc/NetworkManager/nm-system-settings.conf, I have added managed=true (don't know if this matters, but I saw it suggested on one forum): nate@nate-desktop:~$ more /etc/NetworkManager/nm-system-settings.conf # This file is installed into /etc/NetworkManager, and is loaded by # NetworkManager by default. To override, specify: '--config file' # during NM startup. This can be done by appending to DAEMON_OPTS in # the file: # # /etc/default/NetworkManager # [main] plugins=ifupdown,keyfile [ifupdown] #managed=false managed=true At this point, it looks like NetworkManager is running but it's not appearing in the NotificationArea of the panel. I don't know what else to try. Any ideas?

    Read the article

  • ASP.NET C# Session Variable

    - by SAMIR BHOGAYTA
    You can make changes in the web.config. You can give the location path i.e the pages to whom u want to apply the security. Ex. 1) In first case the page can be accessed by everyone. // Allow ALL users to visit the CreatingUserAccounts.aspx // location path="CreatingUserAccounts.aspx" system.web authorization allow users="*" / /authorization /system.web /location 2) in this case only admin can access the page // Allow ADMIN users to visit the hello.aspx location path="hello.aspx" system.web authorization allow roles="ADMIN' / deny users="*" / /authorization /system.web /location OR On the every page you need to check the authorization according to the page logic ex: On every page call this if (session[loggeduser] !=null) { DataSet dsUser=(DataSet)session[loggeduser]; if (dsUser !=null && dsUser.Tables.Count0 && dsUser.Tables[0] !=null && dsUser.Tables[0].Rows.Count0) { if (dsUser.Table[0].Rows[0]["UserType"]=="SuperAdmin") { //your page logic here } if (dsUser.Table[0].Rows[0]["UserType"]=="Admin") { //your page logic here } } }

    Read the article

  • How to disable laptop internal keyboard

    - by Abhijit Navale
    I am using external usb keyboard. I want to disable laptop's internal keyboard using software. I know that i can just remove the internal keyboards wire and disconnect it physically, but i wanted to disable it using software so that later I can enable it by just executing a command in terminal easily. I am talking about disabling the keyboard and NOT the keyboard layout. I am having Hp-Compaq Presario A965 TU Laptop Intel Centrino Core 2 Duo(Freq. 2 GHz). I am using 64 bit Ubuntu Lucid Lynx.

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >