Possible Duplicate: JS delete operator and garbage collection I have a JS object having a large number of properties. If I want to force the browser to garbage collect this object, do I need to set each of these properties as null or do I need to use the delete operator? What's the difference between the two?
I have VBA code to select a range of cells on the same row and then merge & left justify that selection. I would like to enhance it to allow me to select a range or block of rows and perform the same action on each row in the range.
I know I can get the size of the primary screen by using System.Windows.SystemParameters.PrimaryScreenWidth; System.Windows.SystemParameters.PrimaryScreenHeight; But how do I get the size of the current screen? (Multi-Screen users do not always use the primary screen and not all screens are using the same resolution, right?) It would be nice to be able to acces the size from XAML, but doing so from code (C#) would suffice.
Does anyone know of some CRC test vectors for CRC16-CCITT? I do not have a CRC implementation I can trust and either need to test someone's implementation or my own. (For CRC32, I use the PNG code as the gold standard, as it's a reputable reference implementation.) (this site's CRC calculator looks useful but I need to verify correctness somehow) UPDATE: The above CRC calculator looks useful but it takes only ascii, no way to enter hex. --- it's very awkward to enter hex input, though. (ASCII 12 in hex can be entered as %31%32, so you can't just copy+paste a long string of hexadecimal bytes; a
Many file storage systems use hashes to avoid duplication of the same file content data (among other reasons), e.g., Git and Dropbox both use SHA256. The file names and dates can be different, but as long as the content gets the same hash generated, it never gets stored more than once. It seems this would be a sensible thing to do in a OS file system in order to save space. Are there any file systems for Windows or *nix that do this, or is there a good reason why none of them do? This would, for the most part, eliminate the need for duplicate file finder utilities, because at that point the on
I want to join a pages table and menu table. I have errors with the following SQL. function generateTree(&$tree, $parentid = 0) { $res = $this->db->query('SELECT M.*, P.name AS PageName WHERE M.parentid = $parentid ORDER BY M.order asc, M.parentid asc FROM menus AS M LEFT JOIN pages AS P ON P.id = M.page_id'); // ... } Can you tell what I am doing wrong?
I need to run one console application from ASP.NET application using Administrator account and with Desktop interaction enabled. I have tried code below, console app runs ok but within NETWORK SERVICE account. Any ideas how to run console under Administrator account? string enginePath = Server.MapPath(@"~/engine/MyConsole.exe"); System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(enginePath, ""); System.Diagnostics.Process p = System.Diagnostics.Process.Start(info); p.WaitForExit(); Regards, Tomas
I am using Python 2.5 in Windows and I am trying import curses.ascii.* to a django project. Code: from curses.ascii import * Error: No module named _curses. Any suggestion? By the way, the only function I need to use is isalpha()...
I am trying to vocab list for a Greek text we are translating in class. I want to replace every space or tab character with a paragraph mark so that every word appears on its own line. Can anyone give me the sed command, and explain what it is that I'm doing? I’m still trying to figure sed out.
This question goes out to the C gurus out there: In C, it is possible to declare a pointer as follows: char (* p)[10]; .. which basically states that this pointer points to an array of 10 chars. The neat thing about declaring a pointer like this is that you will get a compile time error if you try to assign a pointer of an array of different size to p. It will also give you a compile time error if you try to assign the value of a simple char pointer to p. I tried this with gcc and it seems to work with ANSI, C89 and C99. It looks to me like declaring a pointer like this would be very useful -
Consider the following: me@mine:~$ cat a.sh #!/bin/bash echo "Lines: " $LINES echo "Columns: " $COLUMNS me@mine:~$ ./a.sh Lines: Columns: me@mine:~$ echo "Lines: " $LINES Lines: 52 me@mine:~$ echo "Columns: " $COLUMNS Columns: 157 me@mine:~$ The variables $LINES and $COLUMNS are shell variables, not environmental variables, and thus are not exported to the child process (but they are automatically updated when I resize the xterm window, even when logged in via ssh from a remote location). Is there a way in which I can let my script know the current terminal size? I need this as a workaround to
Is there a high level language with an interpreter, dynamic compiler and static compiler(e.g. like the c++ compiler) along with a multimedia library? The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.
when retrieving data from a URL using curl, I sometimes (in 80% of the cases) get error 18: transfer closed with outstanding read data remaining Part of the returned data is then missing. The weird thing is that this does never occur when the CURLOPT_RETURNTRANSFER is set to false, that is the curl_exec function doesn't return the data but displays the content directly. What could be the problem? Can I set some of the options to avoid such behaviour?
I have a data file where I need to read a datum from each line and store it. And then depending on the value of one of those datums store that data in an array so that I can then calculate the median value of all of these data. The line of data is demographic information and depending on the geographic location, address of a person. I need to capture their age and then find the median of the people that live on a particular street for example. So the data set is 150,000 records and each record has 26 fields, a lot of those fields are segments of an address and then the other fields are just nu
I have a data file where I need to read a datum from each line and store it. And then depending on the value of one of those datums store that data in an array so that I can then calculate the median value of all of these data. The line of data is demographic information and depending on the geographic location, address of a person. I need to capture their age and then find the median of the people that live on a particular street for example. So the data set is 150,000 records and each record has 26 fields, a lot of those fields are segments of an address and then the other fields are just nu
Why is the expression specified inside a comma operator (such as the example below) not considered a constant expression? For example, int a = (10,20) ; when given in global scope yields an error "initializer is not a constant", though both the expressions separated by a comma operator are constants (constant expressions). Why is the entire expression is not treated as a constant expression? For clarification I have read What does the ‘,’ operator do in C? and Uses of C comma operator. They have not dealt this aspect of comma operator.
In Matplotlib, I make dashed grid lines as follows: fig = pylab.figure() ax = fig.add_subplot(1,1,1) ax.yaxis.grid(color='gray', linestyle='dashed') however, I can't find out how (or even if it is possible) to make the grid lines be drawn behind other graph elements, such as bars. Changing the order of adding the grid versus adding other elements makes no difference. Is it possible to make it so that the grid lines appear behind everything else?
I've been looking on golang.org for a Windows compiler, but I can't seem to find it. I can only see Linux and OS X compilers. Does anyone know if Go programming can be done on Windows, or is it something that Google hasn't implemented yet? Update: appears that as of now (Nov. 2012) golang.org has official binary releases for windows 32/x86_64.
I am trying to do it, but all I can get is some source code that I don't know how to do deal with I downloaded from http://pkgconfig.freedesktop.org/releases/.
When I try to compile C code that uses the gets() function with GCC, I get this warning: (.text+0x34): warning: the `gets' function is dangerous and should not be used. I remember this has something to do with stack protection and security, but I'm not sure exactly why. How can I remove this warning and why is there such a warning about using gets()? If gets() is so dangerous then why can't we remove it?
How do you run the following command in PowerShell? C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe -verb:sync -source:dbfullsql="Data Source=mysource;Integrated Security=false;User ID=sa;Pwd=sapass!;Database=mydb;" -dest:dbfullsql="Data Source=.\mydestsource;Integrated Security=false;User ID=sa;Pwd=sapass!;Database=mydb;",computername=10.10.10.10,username=administrator,password=adminpass"
I am programming in Flash for a long-time. It is interesting that most of the things, including open source libraries, are very high-level in the Flash world. It is great because we can build things up quickly. But Flash is too slow (I want to do CV stuff, visual effect, generative art etc). I have tried glut, Processing, OpenFrameworks and I found them too different from Flash. So, I want to know if there is any high-level (like PaperVision3D), fast (better hardware-accelerated) 3D engine? It can be in any language, but better in C++/Java/Python etc.
I want to migrate schema from Oracle to MySQl, so are there any free tools that would be useful for this task? I have "Create table" statements in Oracle SQL Script, but it contains unique constraints and a foreign key. MySQL has MyISAM storage engine, and so foreign key is not supported. How to solve this issue? Sample Oracle create statements: CREATE TABLE channels ( obt_id NUMBER(19) PRIMARY KEY, discriminator VARCHAR2(64) NOT NULL CONSTRAINT check_channel_discriminator CHECK (discriminator IN ('CHANNEL','SALES_CHANNEL')), chan_id VARCHAR2(255), description VARCHAR2(255), name VARCHAR2(255)
Is it possible to let your user download a file with an arbitrary name? For example, there is a file called "4324ffsd34.jpg". I want people to download it via download.php, with a different name (like "filetodownload.jpg"), without renaming the original file. Or, if I'm sending data from a variable to the user as a download, how can I name it?
I'm trying to time some code. First I used a timing decorator: #!/usr/bin/env python import time from itertools import izip from random import shuffle def timing_val(func): def wrapper(*arg, **kw): '''source: http://www.daniweb.com/code/snippet368.html''' t1 = time.time() res = func(*arg, **kw) t2 = time.time() return (t2 - t1), res, func.__name__ return wrapper @timing_val def time_izip(alist, n): i = iter(alist) return [x for x in izip(*[i] * n)] @timing_val def time_indexing(alist, n): return [alist[i:i + n] for i in range(0, len(alist), n)] func_list = [locals()[key] for key in locals().ke
I have the following error while I connect to SQL Server 2008 Management Studio with Windows Authentication. The request failed or the service did not respond in a timely fashion. Consult the event log or other applicable error logs for details. Why am I getting this error, when my SQL Server is running under network service built in a/c?