Hi
I have a question that we always say that null =null is false ,I want to know that when the ansi_nulls is off this statement which is "null=null" is also false? thanks
I have a directory, let's say, "work": ~/work/
This directory has some sub-folders (d1, d2...) in it and files in these sub-folders. I want to make a backup copy in the same folder, so it would be like: ~/backup/work/
However, when I use
cp -r ./work ./backup
the folder "work" is not copied, only its subfoders (so now it's ~/backup/d1 ~/backup/d2...)
Any idea how to make it work? I'm quite new to shell, so I'm missing something :)
Say I have a linked list of numbers of length N. N is very large and I don’t know in advance the exact value of N.
How can I most efficiently write a function that will return k completely random numbers from the list?
I'm using django and realized that when the filename that the user wants to access (let's say a photo) has the pound sign, the entry in the url.py does not match.
Any ideas?
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root':
MEDIA_ROOT},
it just says:
"/home/user/project/static/upload/images/hello" does not exist
when actually the name of the file is:
hello#world.jpg
Thanks,
Nico
i'm building an Android App that has many many TextView that i want to be clickable.
I've tried to assign to the single TextView the properties android:clickable="true" and android:onClick="clickHandler" and when the app fires the clickHandler(View v) i correctly get, through the v.getId(), the clicked item.
What i don't like is to define, for every TextView, the properties android:clickable and android:onClick ... is there something that i can do by code to say: "all the textviews are clickable and click is handled in 'clickHandler' ?"
Thanks and greetings
c
How can I take a screenshot from a site (in batch mode) using perl? I.e. solution should produce image file (say .png) given an URL. It would be nice, if no X Window system will be required for solution to work.
Hi
Say you have a Grid which is having paging, editing and extra, I usually put the whole grid in UpdatePanel to make the page partially render with AJAX, but I hear that u can do AJAX without UpdatePanel, how is that?
Thanks
Hi,
I'm wondering if someone knows how to store an array into a user session?
This is the method to store a single attribute:
$this->getUser()->setAttribute('something', $something);
And the documentation says:
"User attributes can store any type of data (strings, arrays, and associative arrays)"
... but doesn't say anything more. The API documentation doesn't have a "SetAttributes" or something similarly obvious.
Thank you.
I've looked into PeriodicTask, but the examples only cover making it recur. I'm looking for something more like cron's ability to say "execute this task every Monday at 1 a.m."
What is machine learning ?
What does machine learning code do ?
When we say that the machine learns, does it modify the code of itself or it modifies history (database) which will contain the experience of code for given set of inputs?
Say i have this PHP code:
$FooBar = "a string";
i then need a function like this:
print_var_name($FooBar);
which prints:
FooBar
Any Ideas how to achieve this? Is this even possible in PHP?
Dear all,
please, help me to convince, that no matter what you're doing, you need to read some stuff, try to learn something new.
They say, that they don't want to sit in front of computer in the end of a day and they don't have opportunity to read in working hours, or they're too tired for doing something.
Have you faced this kind of situation? What did you do?
Let's say I have remote interface A:
@Remote
public interface A {
public Response doSomething();
}
And implementation:
@Stateless
public class B implements A {
public BeeResponse doSomething() {...}
}
Where:
BeeResponse extends Response.
Response is located in the EJB-API jar and BeeResponse is in the implementation jar.
Response and BeeResponse have different serialVersionUID.
My assumption is that the unmarshalling of the response from B will fail, am I correct?
Hello,
Say I have a test like:
void TestSomething(int someParam)
{
// Test code
}
I would like to execute this test with a set of "someParam" values. I could write explicit [Test] fixtures calling TestSomething() with the parameters, which means having N methods for every TestSomething() method. I could write another [Test] method looping on "someParam" values and calling TestSomething(), it means 2 methods for every test, and the test report is not as good as with individual TestSomethingWithXValue() methods.
So, is there any way to programmatically generate fixtures for every test methods and input values?
Hey guys, was wondering how do i use the NSXML parser.
so lets say given i have a simple xml file with elements like
1/1/1000
14:15:16
How could i use the NSXMLParser to parse the XML File(Its on locally btw, desktop), check through each element and store each of them in an array either to be displayed/used later?
I was looking through some documentation about it and i absolutely have no idea on how to use the parser
i know that there are 3 methods(or more ,please correct me if im wrong) that can be overridden
-..etc didStartElement
-..etc didEndElement
-..etc foundCharacters
This may turn out to be an embarrassingly stupid question, but better than potentially creating embarrassingly stupid code. :-) This is an OO design question, really.
Let's say I have an object class 'Foos' that represents a set of dynamic configuration elements, which are obtained by querying a command on disk, 'mycrazyfoos -getconfig'. Let's say that there are two categories of behavior that I want 'Foos' objects to have:
Existing ones: one is, query ones that exist in the command output I just mentioned (/usr/bin/mycrazyfoos -getconfig`. Make modifications to existing ones via shelling out commands.
Create new ones that don't exist; new 'crazyfoos', using a complex set of /usr/bin/mycrazyfoos commands and parameters. Here I'm not really just querying, but actually running a bunch of system() commands. Affecting changes.
Here's my class structure:
Foos.pm
package Foos, which has a new($hashref-{name = 'myfooname',) constructor that takes a 'crazyfoo NAME' and then queries the existence of that NAME to see if it already exists (by shelling out and running the mycrazyfoos command above). If that crazyfoo already exists, return a Foos::Existing object. Any changes to this object requires shelling out, running commands and getting confirmation that everything ran okay.
If this is the way to go, then the new() constructor needs to have a test to see which subclass constructor to use (if that even makes sense in this context). Here are the subclasses:
Foos/Existing.pm
As mentioned above, this is for when a Foos object already exists.
Foos/Pending.pm
This is an object that will be created if, in the above, the 'crazyfoo NAME' doesn't actually exist. In this case, the new() constructor above will be checked for additional parameters, and it will go ahead and, when called using -create() shell out using system() and create a new object... possibly returning an 'Existing' one...
OR
As I type this out, I am realizing it is perhaps it's better to have a single:
(an alternative arrangement)
Foos class, that has a
-new() that takes just a name
-create() that takes additional creation parameters
-delete(), -change() and other params that affect ones that exist; that will have to just be checked dynamically.
So here we are, two main directions to go with this. I'm curious which would be the more intelligent way to go.
Here's my situation. I have a bunch of vim processes open. Rather than go through one by one and save/quite (:x!) I'd like to send all of the processes a signal - say USR1 - and instead of having it create a recovery .swp file, I'd like it to save the file and exit normally.
Possible?
I'm new to Git. Let's say Alice and Bob had been developing their project by using two Git repositories for each. And, Alice at certain times want to set up a new repository to manage their common progress. Do you think what is the best way to replace remote.origin.url in the configuration of Git?
to replace by git config --replace
to create new repos by git clone MAIN_REPOS
or any?
say ive got a matrix that looks like:
[[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]
how can i make it on seperate lines:
[[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0]]
and then remove commas etc:
0 0 0 0 0
And also to make it blank instead of 0's, so that numbers can be put in later, so in the end it will be like:
_ 1 2 _ 1 _ 1
(spaces not underscores)
thanks
How good is a Flex app in handling large amount of data (say, for a reporting kind of application)
Are there any memory management issues that need to be kept in mind while developing for such an app
Are there any issues in running a Flex app on a Mac?
Hello,
I want to know is this legitimate to say J2SE a framework? If J2SE is a framework, then why there is a collection framework? Isn't collection framework inside J2SE? Please help me!
Hi, This file
String.h
i found while searching about string.h.
Where i can find functions implementation of functions defined in string.h
i.e [say] source code of "void *memcpy(void *, const void *, size_t);
"
Also i want to ask how to make ur functions as an interface with its implmentation hidden from developer as string.h functions has.
Say I make a static class like following with an extension method:
public static class MyStaticExtensionClass
{
private static readonly Dictionary<int, SomeClass> AlgoMgmtDict
= new Dictionary<int, SomeClass>();
public static OutputClass ToOutput(this InputClass input)
{
// clears up the dict
// does some kind of transform over the input class
// return an OutputClass object
}
}
In a multi user system, will the state management dictionary fail to provide correct values for the transform algorithm? Will a regular class be a better design or shoving the Dictionary inside the method a better design?
Hi,
Given the line:
Bitmap bitmap = new Bitmap(stream);
where stream is a System.IO.Stream, are there any limitations on the image file type e.g png, jpg, gif etc that can be handled. i.e are all image file/stream header info clear enough to say "I am an image".
I haven't run into any yet, but have only being using the pretty standard ones so far.
Thanks
When constructing a website, say a Q&A site or a just a forum site for a community, is just knowing HTML,CSS,PHP, MySQL, and javascript enough to make the site dynamic?
I am saying this because when I talked with my teacher, he said that major sites use many languages combined. And he said that a site shouldn't be designed only in PHP.
So is it possible to create a good website, not e-commerce, with only html,css, and php?