Posts Tagged ‘job’
Sunday, August 22nd, 2010
I have a custom php script that looks through text to find key phrases and replaces them using preg_replace, but I’m having trouble getting a clean regex for the job.
For example this sentence:
The fox jumped over the gated fence
because it did not have hands to open
the gate.
I would want to bold all instances of gate, yet respect oddities like gated. And also preserve original capitalization too if possible.
So the end sentence would read like this:
The fox jumped over the gated fence
because it did not have hands to open
the gate
Here is the regular expression I’ve created myself, and you will see that it would not account for gate. because of the period following the word. And also the regex does not respect any original capitalization.
$description = preg_replace("/ $keyphrase /", " <b>$keyphrase</b> ", $description, $limit);
Tags: capitalization, fence, fox, instances, job, oddities, php script, phrases, regex, regular expression
Posted in dotnet, vb, vb.net | No Comments »
Saturday, August 21st, 2010
I was having trouble with file owner rights with files uploaded/resized through scripts. Basically its apache doing the job so they were the assigned owner.
Problem is, I couldn’t change the file permission nor delete those files when needed.
This script somehow works by changing the file permission to 777 so that anyone could delete it. But it changes the whole directory and its subs. I wish to learn a bit of what its doing to modify it.
Heres the source: http://www.frihost.com/forums/vt-14867.html
Heres the code:
PHP Code:
<?php
system
('find . -type d -exec chmod 777 {} ; 2>&1');
system('find . -type f -exec chmod 777 {} ; 2>&1');
print
"nnComplete!";
?>
What does find . -type d -exec chmod 777 {} ; 2>&1 mean?
I know its something like find directories, change permission to 777. But I’m totally lost with the {} ; 2>&1 :confused:
Tags: apache, job, php code, scripts, subs
Posted in dotnet, vb, vb.net | No Comments »
Saturday, August 21st, 2010
hi,
i need activate a div to inform the user when a page is doing something
in ajax or a hidden iframe.
i need put a div on top of all elements and when the job is done
simple remove that div.
is there is a way to lock the page when the job is in operation better.
thanks a lot for your help
Tags: ajax, div, elements, job
Posted in dotnet, vb, vb.net | No Comments »
Saturday, August 21st, 2010
I did a notifier app in C# that sits on the taskbar and display a balloon when i get something from it, similar to Google Talk when you receive a new email but at the momment it ignores if i am running an application on fullscreen or not and just do it is job.
How can i detect and make sure an application is in fullscreen mode ? I dont mean maximized(as an app could be maximized on your screen but still not in fullscreen) mode but true fullscreen.
For example when you run a game most will run in fullscreen mode.
Initially GetForegroundWindow() and GetWindowRect() came to my mind but even so i could make a window go larger then my screen if i am not on fullscreen which would’nt help me so i am wondering if there are other flags or ways to approch this.
Best regards.
Tags: balloon, flags, fullscreen, game, google, job, momment, new email, notifier, taskbar
Posted in dotnet, vb, vb.net | No Comments »
Friday, August 20th, 2010
I generate an omnibus invoice for one or more completed taxi bookings, comprising details and costs taken from each selected job/booking record, but all sharing just the one Invoice Number (the next in the stack). This action ticks a temporary check-box in each chosen record. Once the invoice is dispatched I want to be able to search those records that are still checked and add the one invoice number (identified by DMax + 1) to the currently blank ‘invoice number’ field in each of them, as well as the date of dispatch Date() to the currently blank date field, all for future reference. I have been trying to do this with a macro. I open the Bookings table that feeds the form (via query) but I’m having probs identifying the checked records. Also not sure, if I crack that, how I can add the fresh data back into the relevant records.
Tags: dmax, invoice, job, relevant records, stack, taxi bookings
Posted in dotnet, vb, vb.net | No Comments »
Friday, August 20th, 2010
I’m working on a small project to get myself acquainted with the Amazon web services. I’m trying to make a simple web application; when a button is pressed a mapreduce job is launched and the output is returned on the browser.
What would be the best way to do this? Also, is there a way to launch an amazon elastic mapreduce job via the command line?
Tags: amazon web, job, web application
Posted in dotnet, vb, vb.net | No Comments »
Thursday, August 19th, 2010
Hello,
I have a component that sends messages to a queue to be handled by another system. It should also publish a topic about job statuses every once in a while. Can I just use the same JmsTemplate used to send to a queue AND to publish to a topic?
I created a new topic in ActiveMQ, except that when I send from JmsTemplate a message, a new queue with the topic name gets created with the sent message (instead of sending the data to the actual topic), what am I doing wrong here?
here’s my config:
<bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
<constructor-arg ref="amqConnectionFactory" />
<property name="exceptionListener" ref="jmsExceptionListener" />
<property name="sessionCacheSize" value="100" />
</bean>
<!-- JmsTemplate Definition -->
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<constructor-arg ref="connectionFactory" />
</bean>
<bean id="messageFacade" class="org.foo.MessageFacadeJms">
<property name="jmsTemplate" ref="jmsTemplate" />
</bean>
MessageFacadeJms is the class I use to send a queue message (and it works), can I also just used that to publish a topic?
Can I just use this to do both queue sending and topic publishing?:
jmsTemplate.convertAndSend("TOPIC_NAME" /* or queue name */, message);
Tags: activemq, config, job, queue, statuses
Posted in dotnet, vb, vb.net | No Comments »
Thursday, August 19th, 2010
Hi,
A friend of mine asked me if I could code a theme for a script/CMS, it’s a sort of dating site script. Well I was fully ready to do the job. However, my friend tells me that it has to be tabled layout as the CMS heavily relies on tables.
Here is the problem, I never even coded a tabled web design before. I know that it’s not appropriate to use tables for layouts – I started learning HTML/CSS after tables were considered obsolete. So, what I’m wondering is – in a tabled layout is it alright to use divs to create box etc. within td? or all containers has to be tables?
Any other things I should consider while creating a tabled layout markup?
I’m sure someone is out there that were in the tabled layout era? Thanks in advance.
Tags: cms, containers, dating site, job, layouts, markup, td, thanks in advance, web design
Posted in dotnet, vb, vb.net | No Comments »
Thursday, August 19th, 2010
Hi people,
I am a computer science student therefore I do not know that much.
I was recently talking with a friend who just got a job as a (java) software developer. He told me that in his job there is a guy who is really experienced in C++, but unfortunately every time he writes code in java, he is using the try-catch to control the flow of the program. According to my friend this is a wrong style in Java. Is this true? What are the differences (if any) in using try-catch(-finally in java) between C++ and Java?
Thanks in advance
Cheers
George – Muggen.
Tags: cheers, computer science student, different styles, java software developer, job, muggen, thanks in advance
Posted in dotnet, vb, vb.net | No Comments »
Wednesday, August 18th, 2010
At the risk of sounding misinformed, I’m under the belief that this is basically useful for RAD and fast sketching of an application.
It feels somewhat Ruby-esque in the sense that it scaffolds pretty much everything you need from a CRUD application. Easier work for us, right; and most people are none the wiser.
I’m fairly green in the workplace, I just start working at an actual job as a developer (cubicles and free coffee) so my opinions might be a bit on the green side, but I’d love some comments from more senior people.
Is this somewhere between MVC2(basic scaffolding) and Microsoft Lightswitch(wizard-driven development)? Is it worth ivesting in?
Tags: belief that, cubicles, driven development, dynamic data, free coffee, ivesting, job, lightswitch, microsoft, misinformed, risk, ruby, scaffolding, wizard
Posted in dotnet, vb, vb.net | No Comments »