Hi,
When I use file functions in PHP, I check for EOF. I wonder if EOF actually exist in a file. When I create an empty text file, it displays 0KB. How does EOF exist in a file with 0KB?
i'm looking for a js engine to that I can (easily) expose C/C++ functions, classes etc. The API should allow changing exposed values from within C++ (by storing some kind of pointer or reference to an object inside js or so...). I've considered using google's v8 but I'm new to it and don't know whether it will satisfy my requirements. Can someone tell me whether I should stick to v8 or try something else?
I need to do a custom tree with simple drag and drop functions (mainly for reordering tree nodes)
Coding from scratch, are there any guides/examples out there for getting me jumpstarted?
Oh and using jQuery of course!
Is there an equivalent C function in linux for reading the CPU counter and its frequency?
I am looking for something similair to GetWPC and GetWPCFreq winapi functions that uses the 64bit counters in modern cpu's
It seems like I can't use shell_exec or proc_open on my shared server.
The message I get when I try to use it is:
Warning: shell_exec() has been disabled for security reasons in /home/georgee/public_html/admin/email.php on line 4
Are there any alternatives to these functions?
Should I validate input parameters on all functions I create? Input isn't passed from a user, but from other routines as part of an automatic process.
I use error handling. I'm not sure what more validating input could do for me. If the input isn't valid, that's pretty much the same thing as an error, isn't it?
how moodle1.9 save user attempt quiz result in database and which tables are updated when any quiz has been attempted by user?
Please guide me.
If possible please updated me, which functions are used to insert user quiz attempted data in moodle1.9 database?
Hi guys,
I have a Spring application that I believe has some bottlenecks, so I'd like to run it with a profiler to measure what functions take how much time. Any recommendations to how I should do that?
I'm running STS, the project is a maven project, and I'm running Spring 3.0.1
Cheers
Nik
I'd like to attach a handler to an element using either jQuery live() or delegate().
Looking at the docs I see I can attach the handler for a custom event.
Is this possible for either of these jQuery functions to also trigger the handler?
Basically I want to attach the handler function and run call it once.
Thank you for any help.
I am using TextMate on a Ruby on Rails project and wonder if you can put the mouse on link_to, and then press a key and it will show the definition of link_to, or does this for any other helper functions or Model definition?
Or, click open a box and type in a function name and it will show you the definition?
I am working with USB device on Windows that is seen as a virtual serial port. I can communicate with the device using CreateFile and ReadFile functions, but in some cases my application does not call CloseHandle (when my application in development crashes). After that all calls to CreateFile fail (ERROR_ACCESS_DENIED), and the only solution is to log in to my computer again. Is there any way to force closing the open handle (or reopening) programmatically?
I want to build a relatively simple version of my site for mobile phones but i will definately need javascript and jquery for many functions.
Googling didn't help to find an answer. How is compatibility of jquery with popular browsers in mobile phones? I am talking for smartphones. For example the deafult browsers for these platforms
Windows mobile 6+
Android 1.5+
iphone 3g
and let's add opera mobile.
Has anyone tried it?
I am developing an application which may be hosted on a microsoft sql server, or on Azure SQL, depending upon the end user's wishes.
My whole system works fine with the exception of some WCF functions which determine the last modification time of tables using the following technique:
SELECT OBJECT_NAME(OBJECT_ID) as tableName,
last_user_update as lastUpdate
FROM mydb.sys.dm_db_index_usage_stats
This query fails in Azure. Is there any analogous way to get table last modification dates from Azure's sql?
Problem:
I want my unicode characters to be stored on disk as (rather tan utf8/16 encoding)
\u####
However, I want them dispalyed as unicode characters when opened up in vim.
I think the easiest way to acheive this is some bufopen/bufwrite script that automatically:
on opening, convert \u#### to unicode character
on writing, convert unicode characters into \u####
However, I don't know what functions to call to make this happen. Can someone lend a hand?
Thanks!
Hello everyone,
What do you consider a better programming practice: passing objects as pointers or references to functions. What do you do for input validation?
Thanks.
Hi Guys,
I started commercial programming lately, I am used to functions, then now I always questions about interfaces..
Do you provide me with some links and book names, that can explain deeply why using interfaces?
is interfaces required for small projects??
I am using C#.
thanks
Is it possible to control the standard streams of C++ code in python? The code is wrapped with SWIG and then exposed to Python where I call one of its functions.
I am getting all kinds of unwanted messages coming from C++ code and I want to suppress them either by not using the output stream or by redirecting it to a bit bucket, e.g. devnull from the os module.
Look at this ruby example:
puts ["Dog","Cat","Gates"].1
This will output Cat as ruby allows me to directly access the "anonymous" array created.
If I try this in PHP, however:
echo array("Dog","Cat,"Gates")[1]
This won't work.
What is this called, not only concerning arrays but all functions?
Where else is it possible?
Feel free to change the question title when you know how this "feature" is called.
I'm trying to create a REST based web service with data encapsulated using JSON. My problem is when I pass the string version of JSON in the URI it turns to something like this: %7B%22coal%22:100,%22ele%22:1500.1%7D.
I'm wondering if there are any functions Java for converting between the escaped and unescaped versions so I can parse the string.
I need to modify a GLib's time-out interval while it is in execution. Is that possible? I took a look to the source code and it seems possible to me, but is required use some non-public functions from GLib internals. Should I reimplement GTimeoutSource or there are a way to do it?
Im looking for a way of compressing a given string using the Lempel-Ziv Algorithm.
Preferably there would only be a set of two functions, encoder and decoder.
The encoder takes the string and returns an integer.
The decoder takes the integer and returns the original string.
Time complexity is not important.
How would you implement this?
I know that you can change text editor colours but all the things I want to customized in one group "Identifiers".
Is there a way to break that group into "Variables","Constants","Functions" and things like that so I can customize colours for those things separately?
In a MySQL query I am using the timediff/time_to_sec functions to calculate the total minutes between two date-times.
For example:
2010-03-23 10:00:00
-
2010-03-23 08:00:00
= 120 minutes
What I would like to do is exclude any breaks that occur during the selected time range.
For example:
2010-03-23 10:00:00
-
2010-03-23 08:00:00
-
(break 08:55:00 to 09:10:00)
= 105 minutes
Is there a good method to do this without resorting to a long list of nested IF statements?
What is the best way to shred XML data into various database columns? So far I have mainly been using the nodes and value functions like so:
INSERT INTO some_table (column1, column2, column3)
SELECT
Rows.n.value('(@column1)[1]', 'varchar(20)'),
Rows.n.value('(@column2)[1]', 'nvarchar(100)'),
Rows.n.value('(@column3)[1]', 'int'),
FROM @xml.nodes('//Rows') Rows(n)
However I find that this is getting very slow for even moderate size xml data.