I'm on learning ruby and I took a already done IRC-Bot from the web which just connects to a given serven and not much more.
Then I added some features (in my case I try to implement a voting where to eat lunch).
Now these work fine so far but I don't know if the ruby script does something wrong or there is something wrong with the IRC-server.
On the one I tested the Bot it worked well, giving an output like this:
09:14 < Wayne> !EssNA
09:14 < EssNABot> [-=EssNA-Vote=-]
09:14 < EssNABot> Options are:
09:14 < EssNABot> McDonalds. 0
09:14 < EssNABot> Currywurst 0
09:14 < EssNABot> Hendl..... 0
09:14 < EssNABot> Salatbar.. 0
09:14 < EssNABot> Griechr... 0
09:14 < EssNABot> Metzger... 0
09:14 < EssNABot> Merowinger 0
09:14 < EssNABot> Lidl...... 0
09:14 < EssNABot> Voting time is 600 seconds.
The bot itself sees that like this:
--> PRIVMSG #test [-=EssNA-Vote=-]
--> PRIVMSG #test Options are:
--> PRIVMSG #test McDonalds. 0
--> PRIVMSG #test Currywurst 0
--> PRIVMSG #test Hendl..... 0
--> PRIVMSG #test Salatbar.. 0
--> PRIVMSG #test Griechr... 0
--> PRIVMSG #test Metzger... 0
--> PRIVMSG #test Merowinger 0
--> PRIVMSG #test Lidl...... 0
--> PRIVMSG #test Voting time is 600 seconds.
But on the irc which it should run on if its done the output users will see looks like this:
09:14 < Wayne> !EssNA
09:14 < EssNABot> [-=EssNA-Vote=-]
09:14 < EssNABot> are:
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> 0
09:14 < EssNABot> seconds.
The output the bot gives is the same as on the server on which the output for users works.
Seems to me that the problem is the IRC-server, maybe someone can point me in the right direction?
Yours,
Marius
I am passing in command line arguments to my Lisp program and they are formatted like this when they hit my main function:
("1 1 1" "dot" "2 2 2")
I have a dot function and would like to call it directly from the argument, but first I must strip the " characters.
I tried variations of this function:
(defun remove-quotes (s)
(setf (aref s 0) '""))
to no avail, Lisp complains that "" is not a member of base-char.
Thanks!
I have processed a SSAS cube. After it was done processing, I hit the close button - and then realized that I should have saved the output.
I think SSAS stores the processing log as a text or XML file, but I do not know what folder to look into.
Can someone direct me to retrieving processing logs?
I'm trying to create a weekly calendar that looks like this: http://dhtmlx.com/docs/products/dhtmlxScheduler/sample_basic.html
How can I calculate every week date? For example, this week is:
Monday - Sunday
7 June, 8 June, 9 June, 10 June, 11 June, 12 June, 13 June
Hi,
For Sqilte3 C API, I would use sqlite3_last_insert_rowid. How to get this id when using ActiveRecord after insert a new record? I use following way to insert a new record :
Section.new |s|
s.a = 1
s.b = 2
#I expected the return value of save to be the last_insert_id, but it is NOT
s.save
end
I need to create a php search function for names and need to change LastName, FirstName into LastName..FirstName to search the database. I don't know if this helps, but the string will originally be in the form a variable ($Client).
I need the syntax for the three statements that find the string, matches, and makes the changes.
The webViewDidFinishLoad message seems to be sent each time any object in the page has been loaded. Is there a way to determine that all loading of content is done?
I have 3 text boxes for a phone number. As the user types, it automatically moves from one textbox to the next. When the user presses backspace, I can move focus to the previous text box. The problem is that in IE, focus is set to the beginning of the text box. Here's my code, which works fine in chrome.
$('#AreaCode').live('keyup', function (event) {
if ($(this).val().length == $(this).attr("maxlength"))
$('#Prefix').focus();
});
$('#Prefix').live('keyup', function (event) {
if (event.keyCode == 8 && $(this).val().length == 0)
$('#AreaCode').focus();
if ($(this).val().length == $(this).attr("maxlength"))
$('#Number').focus();
});
$('#Number').live('keyup', function (event) {
if (event.keyCode == 8 && $(this).val().length == 0)
$('#Prefix').focus();
});
How do I make the focus set at the end of the contents when going backwards?
I have a whole bunch of percentages stored as XX% (e.g. 12%, 50%, etc..) I need to remove the percentage sign and then multiply the percent against another variable thats just a number (e.g. 1000, 12000) and then output the result. Is there a simple way to strip the percentage sign and then calculate the output with PHP? Or should I consider some sort of JS solution?
Please answear me how can i access the ListView in controlTemplate, or what event handler to use for extracting sender parameter that will be called every time my Collection is updated. Please give a solution! I make brainstorming for a week already!!
I need some advice
I have two tables, one holds unique serial numbers of items (items) and the other holds status changes and other information for these items (details)
The Tables are set up as follows
Item
itemID
itemName
itemDate
details
detID
itemID
modlvl
status
detDate
All items have at least one record in the details table, but over time the status has changed or the modification level has changed (Both of these are identified by numbers which are held in other appropriate tables) and a new record is created each time the status/modlvl changes
I want to display a table on my webpage using php that identifies the different mod levels of the items and shows a count of each of the current status of the items
EDIT
Hi Ronnis,
This is an example of the data in the tables and what I want to achieve
The current Mod Levels range from 1 to 3
Status representations are
1 In Use
2 In Store
3 Being repaired
4 In Transit
5 For Disposal
6 Disposed
7 Lost
Item
itemID OrigMod created
1000 1 2009-10-01 22:12:12
1001 1 2009-10-01 22:12:12
1002 1 2009-10-01 22:12:12
1003 1 2009-10-01 22:12:12
1004 1 2009-10-01 22:12:12
1005 1 2009-10-01 22:12:12
1006 1 2009-10-01 22:12:12
1007 1 2009-10-01 22:12:12
1008 1 2009-10-01 22:12:12
1009 1 2009-10-01 22:12:12
1010 1 2009-10-01 22:12:12
Details
detID itemID modlvl detDate status
1 1000 1 2009-10-01 1
2 1001 1 2009-10-01 1
3 1002 1 2009-10-01 1
4 1003 1 2009-10-01 1
5 1004 1 2009-10-01 1
6 1005 1 2009-10-01 1
7 1006 1 2009-10-01 1
8 1007 1 2009-10-01 1
9 1008 1 2009-10-01 1
10 1009 1 2009-10-01 1
11 1010 1 2009-10-01 1
12 1001 1 2010-02-01 2
13 1001 1 2010-02-03 4
14 1001 1 2010-03-01 3
15 1000 1 2010-03-14 2
16 1001 2 2010-04-01 4
17 1006 1 2010-04-01 2
18 1001 2 2010-04-03 2
19 1006 1 2010-04-14 4
20 1006 1 2010-05-01 5
21 1002 1 2010-05-02 2
22 1003 1 2010-05-10 2
23 1010 1 2010-06-01 2
24 1006 1 2010-06-18 6
25 1010 1 2010-07-01 7
26 1007 1 2010-07-02 2
27 1007 1 2010-07-04 4
28 1003 1 2010-07-10 2
29 1007 1 2010-07-11 3
30 1007 2 2010-07-12 4
31 1007 2 2010-07-15 2
32 1001 2 2010-08-31 1
33 1001 2 2010-09-10 2
34 1001 2 2010-10-01 4
35 1008 1 2010-10-01 2
36 1001 2 2010-10-05 3
37 1008 1 2010-10-05 4
38 1008 1 2010-10-10 3
39 1001 3 2010-10-20 4
40 1001 3 2010-10-25 2
Using the tables above I want to get this result
MoLvl Use Store Repd Transit Displ Dispd Lost Total
1 3 3 1 0 0 1 1 9
2 0 1 0 0 0 0 0 1
3 0 1 0 0 0 0 0 1
Total 3 5 1 0 0 1 1 11
Hello,
This is the final output
My HTML
<li id='$id'>TEXT
<ul class='indent'>
<li id='$id'>TEXT</li>
<li id='$id'>TEXT</li>
<li class='formContainer'> FORM </li>
</ul>
</li>
I want to append a li between form after all other li So in this example new li will be appended between Test141 APPEND Input Box
The $id are db ids of li which are unique
Say you have an array, data, of unknown length. Is there a shorter method to get elements form a starting index to the end than
subdata = data(2:length(data))
I would like to use the EmailField in a form. However, instead of only storing
[email protected]
I want to store
"ACME Support" <[email protected]>
The reason is, that when I send email, I would like a "friendly name" to appear.
Can this be done?
Let's assume I have a database with two tables: categories and articles. Every article belongs to a category.
Now, let's assume I want to fetch the latest article of each category that fits a specific criteria (read: the article does). If it weren't for that extra criteria, I could just add a column called last_article_id or something similar to the categories table - even though that wouldn't be properly normalized.
How can I do this though? I assume there's something using GROUP BY and HAVING?
Hi folks,
I wanna have a drop down that lets me select "Week Commencing Monday the 20th" going back 10 Mondays but I'm not sure how to go about doing this.
I've used date.now(), etc. before but not sure how to do this one.
Thanks,
Billy
My ideal workflow would consist of the following steps
edit the code
compile
git commit -a -m "commit message"
start running the new binaries, tests, etc. (may take 10+ minutes)
start new changes, while the binaries are still running
when step # 4 is finished, edit the commit message from step # 3, without committing the changes introduced in step # 5, by adding, say, "test FOO failed"
I cannot use git commit -a --amend -m "new commit message", because this commits the new changes as well. I'm not sure that I want to bother with staging or branching. I wish I could just edit the commit message without committing any new changes. Is it possible?
I'm trying to download a lot of files after downloading a sql statement must insert a record.
I'm using System.Net.Client to download each file synchronously, still it could be done asynchronous. There's no relation or dependency between each download.
At first I just tried to use WebClient.DownloadFileAsync but that shutted the program down and killed all the download processes/threads. Second I tried to create a wait routine something like this;
while (processedFiles < totalFiles)
Thread.Sleep(1000)
This freezed everything. So could someone tell me which aproach to take to implement this Async?
Hi I have a field in mySql table called jobnumber which auto increments with each new entry. What I want to do is when a user views my form, get the value of the next 'jobnumber' . But I want to do this before any entry is made to the table. IE so when a user looks at a form it will display something like 'this is job number 6954'
I have tried $rr = mysql_insert_id() but this only work after I have made an entry
Can anyone help please
thanks
Hi, i've got stuck with substring.
On input i've got a string that looks like Sometext (123456). Those digits at the end are random. I need to get only text from that string.
Hi,
This is the output of my 'git log'. But when I do a 'git pull' , the top commit causes conflict. So I did a 'git rebase -abort'
commit 7826b25db424b95bae9105027edb7dcbf94d6e65
commit 5d1970105e8fd2c7b30c232661b93f1bcd00bc96
But my question is Can I 'save' my commit to a patch and then do a git pull?
Just like I want to emulate
* I did not do a git commit, but I did a 'git stash' instead
* Do a git pull so that I should not get any merge error
So I need to somehow 'turn back the clock'. Is that possible in git?