Search Results

Search found 780 results on 32 pages for 'desu never lies'.

Page 16/32 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Javascript global variable not working properly?

    - by Fabian
    My jQuery code: $(document).ready(function() { chrome.extension.sendRequest({get: "height"}, function(response) { height = response.value; }); $("#id").css("height", height+"px"); }); You don't have to be concerned about the chrome.extension.sendRequest(), basically it communicates with a background page to fetch the value for "height" from localStorage and stores the value in global variable height. The problem lies in $("#id") not being assigned the height value. However if I were to modify it such that it is now: $(document).click(function() { $("#id").css("height", height+"px"); }); it works. Any idea why?

    Read the article

  • IE 6 dropdown selection area too narrow

    - by Cool Hand Luke UK
    Hi, I have a dropdown menu with the width set to 142px however the selection area when you drop down the menu needs to be larger as it has text that exceeds this width. Firefox (and most modern browsers) is clever and extends the selection area to fit in this text. However IE 6 and unchecked newer versions of IE do not show this text and keep the selection area the same width as the dropdown unclicked. The problem lies here, how can I get IE to extend the selection area where you click the selection you want without increasing the width of the dropdown area with out the dropdown selection showing. Hope that makes sense. :D cheers (DEATH TO IE)

    Read the article

  • What c# equivalent encoding does Python's hash.digest() use ?

    - by The_AlienCoder
    I am trying to port a python program to c#. Here is the line that's supposed to be a walkthrough but is currently tormenting me: hash = hashlib.md5(inputstring).digest() After generating a similar MD5 hash in c# It is absolutely vital that I create a similar hash string as the original python program or my whole application will fail. My confusion lies in which encoding to use when converting to string in c# i.e ?Encoding enc = new ?Encoding(); string Hash =enc.GetString(HashBytes); //HashBytes is my generated hash Because I am unable to create two similar hashes when using Encoding.Default i.e string Hash = Encoding.Default.GetString(HashBytes); So I'm thinking knowing the deafult hash.digest() encoding for python would help

    Read the article

  • Doing a UNION ALL on two different COUNTs using Linq-To-Sql

    - by Danno
    Is it possible to write a linq-to-sql statement that will return two different COUNTs that have been put into a single dataset using UNION ALL? I know this is syntactically wrong but here's what I'm trying to do: (from t1 in TableOne select t1).Count().Union( (from t2 in TableTwo select t2).Count() ) Here's the sql I would like would like to have generated: select count(*) from TableOne union all select count(*) from TableTwo I realize that Count() returns an int and does not have a Union method on it and therein lies my question. Can Linq-to-Sql be written that will achieve what I'm after?

    Read the article

  • Wrapping 3 objects or less inside a while / foreach in PHP

    - by DarkGhostHunter
    Simple question. I have an array of 21 elements, and show every three of them inside a <div> block. The code is something like this: <?php $faces= array( 1 => 'happy', 2 => 'sad', (sic) 21 => 'angry' ); $i = 1; foreach ($faces as $face) { echo $face; $i++; } ?> The problem lies when this array doesn't have 21 elements, sometimes it gets 24, an other times 17. How I wrap every three of them, and wrap alone the rest? I came up with using switch and case, but that works only when there are 21 elements only. I think I could count them beforehand and put a closing in the last one (even if it is a group of one element).

    Read the article

  • Does a c/c++ compiler optimize constant divisions by power-of-two value into shifts?

    - by porgarmingduod
    Question says it all. Does anyone know if the following... size_t div(size_t value) { const size_t x = 64; return value / x; } ...is optimized into? size_t div(size_t value) { return value >> 6; } Do compilers do this? (My interest lies in GCC). Are there situations where it does and others where it doesn't? I would really like to know, because every time I write a division that could be optimized like this I spend some mental energy wondering about whether precious nothings of a second is wasted doing a division where a shift would suffice.

    Read the article

  • How to identify deadlock conditions in a third-party application?

    - by Imhotep is Invisible
    I am using a third-party application to handle batch CD audio extraction via multiple FireWire attached devices, but the application frequently (though non-deterministically) hangs during the extraction. I suspect that the multithreaded application is deadlocking over some shared resource. The developer, however, suspects the problem lies elsewhere but is not addressing the problem at this time. I would like to be able to do some legwork on my end to a) prove the condition exists and b) ideally point him in the right direction. The problems: while I used to be a programmer, it's been awhile and I need to shake off the dust (last work I did was back in '99 and it was under Solaris, while the application runs under XP). Rather than there being a dearth of information online, there's almost too much to digest. Are there any suggested guides or tutorials that might help me get back up to speed sufficient enough to help identify and/or diagnose the deadlock, or are there tools or approaches that I should study up on to aid me in my task? Many thanks for all suggestions!

    Read the article

  • Static assembly initialization

    - by ph0enix
    I'm attempting to develop an Interceptor framework (in C#) where I can simply implement some interfaces, and through the use of some static initialization, register all my Interceptors with a common Dispatcher to be invoked at a later time. The problem lies in the fact that my Interceptor implementations are never actually referenced by my application so the static constructors never get called, and as a result, the Interceptors are never registered. If possible, I would like to keep all references to my Interceptor libraries out of my application, as this is my way of (hopefully) enforcing loose coupling across different modules. Hopefully this makes some sense. Let me know if there's anything I can clarify... Does anyone have any ideas, or perhaps a better way to go about implementing my Interceptor pattern? TIA, Jeremy

    Read the article

  • Out of Memory Matlab Error

    - by Hani
    Dears. I am using Matlab 2009b and having an out of memory error. I read other posted sol but they are not useful for me. I am sure that i am doing things right but i must use very huge amount of array sizes. I think that the problem lies beyond the fact that Matlab does not enable an array to be in more than one OS block. I am using Windows 7. Is there a way to get rid of this problem. For example can i increase the array block that Matlab uses in Windows 7? Thanks...Hani Almousli

    Read the article

  • Killing a subprocess including its children from python

    - by user316664
    Hi, I'm using the subprocess module on python 2.5 to spawn a java program (the selenium server, to be precise) as follows: import os import subprocess display = 0 log_file_path = "/tmp/selenium_log.txt" selenium_port = 4455 selenium_folder_path = "/wherever/selenium/lies" env = os.environ env["DISPLAY"] = ":%d.0" % display command = ["java", "-server", "-jar", 'selenium-server.jar', "-port %d" % selenium_port] log = open(log_file_path, 'a') comm = ' '.join(command) selenium_server_process = subprocess.Popen(comm, cwd=selenium_folder_path, stdout=log, stderr=log, env=env, shell=True) This process is supposed to get killed once the automated tests are finished. I'm using os.kill to do this: os.killpg(selenium_server_process.pid, signal.SIGTERM) selenium_server_process.wait() This does not work. The reason is that the shell subprocess spawns another processfor the java program, and the pid of that process is unknown to my python code. I've tried killing the process group with os.killpg, but that kills also the python process which runs this code in the first place. Setting shell to false, thus avoiding the java program to run inside a shell environment, is also out of the question, due to other reasons. Does anyone have an idea how I can kill the shell and any other processes generated by it? Cheers, Ulas

    Read the article

  • Micro Controller Serial Data identification or classification

    - by Posiedon
    I have a x51 family micro controller (P89V51RD2). I'm going to send some data from computer using serial port. The data i'll be sending are Character 'S' Character 'R' and a 2 digit integer. Upon receiving the data, I will be calling separate functions. I used if(chr=='S') and elseif(chr=='R')for character data. The main problem lies with identifying the 2 digit number sent. Any other data other than the above three mentioned will be discarded. Any ideas for identifying two digit integer ??

    Read the article

  • C#: How to unit test a method that relies on another method within the same class?

    - by michael paul
    I have a class similar to the following: public class MyProxy : ClientBase<IService>, IService { public MyProxy(String endpointConfiguration) : base(endpointConfiguration) { } public int DoSomething(int x) { int result = DoSomethingToX(x); //This passes unit testing int result2 = ((IService)this).DoWork(x) //do I have to extract this part into a separate method just //to test it even though it's only a couple of lines? //Do something on result2 int result3 = result2 ... return result3; } int IService.DoWork(int x) { return base.Channel.DoWork(x); } } The problem lies in the fact that when testing I don't know how to mock the result2 item without extracting the part that gets result3 using result2 into a separate method. And, because it is unit testing I don't want to go that deep as to test what result2 comes back as... I'd rather mock the data somehow... like, be able to call the function and replace just that one call.

    Read the article

  • Getting data from the next row in Oracle cursor

    - by Chaotic_one
    Hi, I'm building nested tree and I need to get data for the next row in cursor, using Oracle. And I still need current row, so looping forward is not a solution. Example: OPEN emp_cv FOR sql_stmt; LOOP FETCH emp_cv INTO v_rcod,v_rname,v_level; EXIT WHEN emp_cv%NOTFOUND; /*here lies the code for getting v_next_level*/ if v_next_level > v_level then /*code here*/ elsif v_next_level < v_level then /*code here*/ else /*code here*/ end if; END LOOP; CLOSE emp_cv;

    Read the article

  • Application Role and access second database

    - by lszk
    I have written a script to create an audit trails to my database in a second one db. So far I had no problems during tests on my dev machine from SQL Server Management Studio. Problems started to occurs when I first tried to test my triggers from my application by modyfing data in it. Using profiler I found out, that my audit trails db is not visible in sys.databases, so here lies the problem. The application using an Application Role, so as I found on MSDN, that's why I can't get access to other db on the server. I'm not a DBA. I have no experience with properly settings the security stuff, so please guide me, how can I set the setting for guest account (according to MSDN) to get access to this db? I need to have a record for this database in sys.databases and I need to be able to insert data in this database in all tables. No select, update or delete I need.

    Read the article

  • MySQL: How to separate a name field in one table into firstname / lastname in two separate tables?

    - by Eileen
    I have a drupal database where the node table is full of profiles. The field node.title is "Firstname Lastname". I want to separate the names so that node.title = "Firstname", and over in another table entirely, content_type_profile.field_lastname_value = "Lastname". The entries in the two tables can be joined on the field nid. I'd love to run a SQL command to do this, and I am fine with taking the naive approach that the first word is the first name, and everything else in the field is last name -- it will mean a few manual corrections down the line, but that's much better than doing it all by hand in the first place. (I read this question and surely the answer lies in there but I am not that SQL-savvy and am not sure how to make it work for my database.) Thanks!

    Read the article

  • Javascript Methodname is replaced with !==

    - by dasheddot
    Hey! On the server lies a html file with javascript code included. This javascript code includes a method called something like "CheckObject". This file works for all users, except one specific (but important). He gets a javascript error and in his browser sourcode appears something unbelievable: The methodname "CheckObject" is replaced with "Check!==ect", means the "Obj" of the method name is replaced with !==. Why could that be? Hope anybody can help me! Best regards

    Read the article

  • Java Trusting ssl CA

    - by LuigiEdlCarno
    I guess I am out of ideas here. I am trying to consume a web service in java which has an ssl certificate. I createt a a keystore file in which I have added the certificate. The file lies in my project folder. I imported it using: System.setProperty("javax.net.ssl.keyStore", "folder\\keystore.jks"); System.setProperty("javax.net.ssl.keyStorePassword", "SECRET"); Apparently, the web service call checks the keystore because when giving a wrong path to the file the application throws an exception when invoking the WS, not when setting the system property. Anyway, when giving the correct path to the keystore file, I still get AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (401)Authorization Required Someone told me I had to trust the CA, before any of this would work. How do I do this?

    Read the article

  • Is pthread_spin_trylock safe inside of sigsegv handler of multithreaded application?

    - by TWMouton
    I am trying to implement a handler that on SIGSEGV will collect some information such as process-id, thread-id and a backtrace and write this information to a file/pipe/socket. The problem lies in that there is the (probably pretty high) possibility that if one thread experienced a SIGSEGV that the others will shortly follow. If two threads happen to make it to the bit of code where they're writing their report out at the same time then they'll interleave their writing (to the same file). I know that I should only be using async-signal-safe functions as detailed in signal(7) I also have seen at least two cases here and video linked in top answer here where others have used pthread_spin_trylock to get around this problem. Is this a safe way to prevent the above problem?

    Read the article

  • In Android, does _id have to be present in any table created?

    - by Andy
    I am trying to create a table to only has a foreign key, not a primary key. I am getting this error: java.lang.IllegalArgumentException: column '_id' does not exist I read a tutorial that the primary key must be _id, with no explanation. And that is fine. But what if I do not want a primary key! What if I only want a foreign key. I am assuming this is where my problem lies. The schemas below are what I have. But the third one is where I assume this is coming from. database.execSQL("CREATE TABLE events (" + "_id INTEGER PRIMARY KEY, event_name TEXT" + ")"); database.execSQL("CREATE TABLE reminders(_id INTEGER PRIMARY KEY, event_name TEXT" + ")"); database.execSQL("CREATE TABLE events_info (_id INTEGER, event_name TEXT, all_day INTEGER, " + "start_date INTEGER, start_time INTEGER, end_date INTEGER, end_time INTEGER," + " location TEXT, reminder_id INTEGER, notes TEXT, repeat TEXT," + "FOREIGN KEY(_id) REFERENCES events(_id), FOREIGN KEY(reminder_id) REFERENCES reminders(_id))" );

    Read the article

  • Google Chrome hardware acceleration making game run slow

    - by powerc9000
    So I have been working on a game in HTML5 canvas and noticed that the games lags and performs much slower when hardware acceleration is turned on in Google Chrome then when it is turned off. You can try for yourself here From doing some profiling I see that the problem lies in drawImage. More specifically drawing one canvas onto another. I do a lot of this. Hardware Acceleration on. Hardware Acceleration off. Is there something fundamental I am missing with one canvas to another? Why would the difference be that profound?

    Read the article

  • Create a table of Quantiles in R for multiple Subsets of Data

    - by user1489719
    I'm trying to create append a table of quantiles in R for multiple subsets of data. Right now, I have a vector of ids (p_ids) in table DATA, which are not consecutive. For each value in p_ids, I am looking to list the quantile. So far, I've tried variations of: i <- 1 n <- 1 for (i in p_ids) { while(n <= nrow(data)) { quantiles[n] <- quantile(subset(alldata$variableA, alldata$variableB == i),probs = c(0,1,2,3)/3) n <- n + 1 } } I know my issue lies somewhere in the index, but I can't seem to get where the index should go. Suggestions?

    Read the article

  • Value of Step-by-Step Asserts in Unit Tests

    - by Eric J.
    When writing unit tests, there are cases where one can create an Assert for each condition that could fail or an Assert that would catch all such conditions. C# Example: Dictionary<string, string> dict = LoadDictionary(); // Optional Asserts: Assert.IsNotNull(dict); Assert.IsTrue(dict.Count > 0); Assert.IsTrue(dict.ContainsKey("ExpectedKey")); // Condition actually interested in testing: Assert.IsTrue(dict["ExpectedKey"] == "ExpectedValue"); Is there value to a large, multi-person project in this kind of situation to add the "Optional Asserts"? There's more work involved (if you have lots of unit tests) but it will be more immediately clear where the problem lies. I'm using VS 2010 and the integrated testing tools but intend the question to be generic.

    Read the article

  • mysql database design: threads and replies

    - by ajsie
    in my forum i have threads and replies. one thread has multiple replies. but then, a reply can be a reply of an reply (like google wave). because of that a reply has to have a column "reply_id" so it can point to the parent reply. but then, the "top-level" replies (the replies directly under the thread) will have no parent reply. so how can i fix this? how should the columns be in the reply table (and thread table). at the moment it looks like this: threads: id title body replies: id thread_id (all replies will belong to a thread) reply_id (here lies the problem. the top-level replies wont have a parent reply) body what could a smart design look like to enable reply a reply?

    Read the article

  • how to put .properties file in classpath of an Eclipse plug-in

    - by Krt_Malta
    Hi. I have an application which is making use of a .jar file and a .properties file which must reside in the same directory as where the .jar file lies. On a normal java application, this works fine, however I'm building an Eclipse plug-in. I've tried attaching the .properties everywhere, in the classpath, build path, putting them in the same folder and calling the jar file from there (this gives an obsure error) and I've even tried putting the .properties file inside the .jar file even.... but no luck. Any ideas how this could be done please? Thanks and regards, Krt_Malta

    Read the article

  • best practice for Jquery plugin implementation and resource locations

    - by ptutt
    This is probably a very basic question, but I seem to have issues plugging in jquery plug-ins. The issue seems to be around the location of the script, css and images and ensuring the css has the correct url to the images. The standard plug-in has the following folder structure (eg : JPicker) js css images My project is asp.net mvc so I have the default: scripts images content So, I try to split the jquery plugin to the appropriate folders (not sure if this is the best way?). Then I try to correct the references to images (background urls) in the css. I believe the url is relative to the page that is implementing the css file, not the location of the css file itself. Anyway, when I try the above, the plugins don't seem to work. I believe the issue lies with the images not being found. The jquery code runs without errors, so I assume that's not the problem. Any help/advice much appreciated

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >