Hello,
I have a PHP code in which I want to use some functions of jQuery. Should I use a html file with PHP code and jQuery included in it or is there a way to use jQuery with PHP?
Just had a curious thought, but for general coding and programming, do you think it's best to work out all the logic yourself and start from a blank sheet or just take a code that has been written already(by you or someone else) and just change it to your liking? Assuming you have a programming background of like 1year+. (because as a beginner, it's best to learn from nothing)
I'm not saying copy+paste someone else's code and say it's yours.
I'm writing an InfoPath web form, using C# code behind. The form is a holiday request, after the user inputs the start and end dates I want the code to query a bank-holiday sharepoint list and count occurrences between the dates.
I've added the sharepoint list as a second datasource however I'm now stuck. Any ideas?
Hi Everybody, I want to know that we can use F12 to jump to the function that is called from this code , if i have to return to the code again how I can do this.
I have a Cocoa application which uses an installer. I want to be able to run code coverage over the code (after it has been installed).
This is not the usual unit-test scenario where a single binary will run a suite of tests. Rather, the tests in question will interact with the UI and the app back-end whilst it is running, so I ideally want to be able to start the application knowing that Gcov is profiling it and then run tests against it.
Any ideas?
This has to be pretty simple, but I'd like to parse the current URL and execute conditional code depending on whether the user is on the /sitemap/ directory.
So for example, if the site is example.com, and if the request is example.com/sitemap/.
Then I want to execute conditional code in that case. I'm using wordpress so I'm not sure if there is a built-in function that gets this...
A pure PHP solution is fine.
I want example.com/23-45 be transformed to example.com?id=23-45
Could you please post the code I should add to .htaccess file to make this work
(Is this everything I should do to make this work - add a piece of code to .htaccess file ???)
Thanks a lot!
ofstream f("test",app);
f.seekp(5,ios::beg);
f << "hello world";
f.close();
What I'm trying to do here is open a file that already has data in it, and then put "hello world" somewhere in the middle of the file. However, when I run my code, it overwrites the whole file. How can this code be fixed?
Is there any good reason to avoid unused import statements in Java? As I understand it, they are there for the compiler, so lots of unused imports won't have any impacts on the compiled code. Is it just to reduce clutter and to avoid naming conflicts down the line?
(I ask because Eclipse gives a warning about unused imports, which is kind of annoying when I'm developing code because I don't want to remove the imports until I'm pretty sure I'm done designing the class.)
I've just started to use netbeans IDE 6.8. And consulted youtube for tutorials. And I've seen that the code is being completed just like in dreamweaver. Whenever you type something. And it shows some suggestions on what probably would be the next code.
But when I tried it on my computer. It does not do this. How do I configure it?
Hi
There are several PHP or js code formatting libs out there -- does anyone know if similar libs exist in Java?
Ie., Given a string of code, return a formatted string with syntax colouring etc.
It'd be ideal if it auto detected the language, but I might be pushing my luck there...
Hi,
Is sequential coupling (http://en.wikipedia.org/wiki/Sequential_coupling) really a bad thing in code?
Although it's an anti-pattern, the only risk I see is calling methods in the wrong order but documentation of an API/class library with this anti-pattern should take care of that. What other problems are there from code which is sequential? Also, this pattern could easily be fixed by using a facade it seems.
Thanks
Hi All,
I need to convert the IL to c# code.
I have an assembly and I am reading this assembly.
I get MethodBody from MethodInfo and the methodbody has a method GetILAsByteArraY()
which returns a byte array now I want to comvert this IL to C# code.
Please help me out in solving this.
Hi, can anyone help me out.
i have a apllication where i want to log exception in files and dont want to change code.just acomponet which i can add in my code and it will start logging exceptions.
Thanks in advance.
Hi Everybody, I want to know that we can use F12 to jump to the function that is called from this code , if i have to return to the code again how I can do this.
I am not able to get through with this code...I need to capture the request but with this code I am able to redirect but it cannot find the particular search page.
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /searcha\.php\?name=(www\.)?([^/\ ]+)[^\ ]*\ HTTP/
RewriteRule ^.*$ http://www.mydomain.com/%2? [R=301,L]
can any one tell me what is I am missing??
Many of today's programming languages are based on C; like C++, C#, Java, Objective-C. So could I call a C method from C++ code? Or call C from Java or C#? Or is this goal out of reach and unreasonable? Please include a quick code sample for my and everyone else's understanding.
<script ID="clientEventHandlersVBS" LANGUAGE="vbscript">
s=pass()
y=s
</script>
<%
session("password")=y
Response.write(session("password"))
Response.write(y)
%>
i have this code. but nothing is getting stored inside the session variable neither anything is getting printed. cant i access the variables declared outside the asp code or is their any syntax mistake. any help is really appreciated
I am looking at some code that has a lot of sort calls using comparison functions, and it seems like it should be using key functions.
If you were to change seq.sort(lambda x,y: cmp(x.xxx, y.xxx)), which is preferable:
seq.sort(key=operator.attrgetter('xxx'))
or:
seq.sort(key=lambda a:a.xxx)
I would also be interested in comments on the merits of making changes to existing code that works.
this is gaema : http://code.google.com/p/gaema/
this demo : http://code.google.com/p/gaema/source/browse/#hg/demos/webapp
only has Google Accounts
i want demo for Facebook and Twitter
thanks
There is a nice feature in Visual Studio: you can create special code areas which can be minimized just as class methods in Eclipse are minimized. Like:
#region
//some code
#endregion
Is there a way do make such pleasant feature in Eclipse?
I'm making a game where each Actor is represented by a GameObjectController. Game Objects that can partake in combat implement ICombatant. How can I specify that arguments to a combat function must inherit from GameObjectController and implement ICombatant? Or does this indicate that my code is structured poorly?
public void ComputeAttackUpdate(ICombatant attacker, AttackType attackType, ICombatant victim)
In the above code, I want attacker and victim to inherit from GameObjectController and implement ICombatant. Is this syntactically possible?
Instead of going through each (+) sign at the left and clicking them to expand the collapsed code snippets, is there a shortcut or menu item (I couldn't find it, VS has that) to expand all the collapsed code/comments at once?
Thanks.
Hello everyone, this morning I came across this code, and I have absolutely no idea what that means, can anyone explain me what do these represent, ex:
public class MyClass<T>
...
some bits of code then
private Something<T> so;
private OtherThing<T> to;
private Class<T> c;
Thank you
I can examine the optimization using profiler, size of the executable file and time to take for the execution.
I can get the result of the optimization.
But I have these questions,
How to get the optimized C code.
Which algorithm or method used by C to optimize a code.
Thanks in advance.