I'm searching for a way to parse the whole directory with source code with semantic. Is this possible to do without explicitly opening each file in emacs ?
I am trying to do some research on file formats especially image formats. Information such as header layouts for particular types of image formats and how to parse them using C++. If anyone can point me in the right direction of some good tutorials or books. that would be helpful. thanks
Hi,
I'm trying to switch one of my websites into en-UK so that I get the correct date and currency formats etc...
I have found this yaml file:
http://github.com/mattetti/globalite/blob/master/lang/rails/en-UK.yml
Any ideas if there is a better one to use?
I also checked here but could not see it:
http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale
Thanks,
Nick
I need to read a file and send the text from it to a string so I can parse it. However, the program won't know exactly how long the file is so what would I do if I wanted to use fgets, or is there a better alternative?
Note:
char * fgets ( char * str, int num, FILE * stream );
I need to create a dinamic page with a Fullcalendar plugin.
I want to drag event (div) to calendar from a sidebar.
Any idea to do this with Fullcalendar or with other plugin ?
Any example ?
I found this link http://github.com/arshaw/fullcalendar/tree/fcdraggable, but don't work fine and it has some bug.
Hello,
Can anyone tell me how to parse a local xml file stored in the system using SAX ,with an example code.please also tell me where can i find information on that
How can I cache an XSD schema (residing on disk) to be reused when parsing XMLs in Xerces (C++)?
I would like to load the XSD schema when starting the process, then, whenever I need to parse an XML, to validate it first using this loaded schema.
How can I work out the maximum row size in a table, if I'm only given the datatype lengths (from all_tab_cols.data_length column) of the columns in the table (ie no statistics or ANALYZE)? There's extra complications in that this is an IOT, so there's index tree size to consider as well.
I recently read this question regarding information gain and entropy. I think I have a semi-decent grasp on the main idea, but I'm curious as what to do with situations such as follows:
If we have a bag of 7 coins, 1 of which is heavier than the others, and 1 of which is lighter than the others, and we know the heavier coin + the lighter coin is the same as 2 normal coins, what is the information gain associated with picking two random coins and weighing them against each other?
Our goal here is to identify the two odd coins. I've been thinking this problem over for a while, and can't frame it correctly in a decision tree, or any other way for that matter. Any help?
EDIT: I understand the formula for entropy and the formula for information gain. What I don't understand is how to frame this problem in a decision tree format.
EDIT 2: Here is where I'm at so far:
Assuming we pick two coins and they both end up weighing the same, we can assume our new chances of picking H+L come out to 1/5 * 1/4 = 1/20 , easy enough.
Assuming we pick two coins and the left side is heavier. There are three different cases where this can occur:
HM: Which gives us 1/2 chance of picking H and a 1/4 chance of picking L: 1/8
HL: 1/2 chance of picking high, 1/1 chance of picking low: 1/1
ML: 1/2 chance of picking low, 1/4 chance of picking high: 1/8
However, the odds of us picking HM are 1/7 * 5/6 which is 5/42
The odds of us picking HL are 1/7 * 1/6 which is 1/42
And the odds of us picking ML are 1/7 * 5/6 which is 5/42
If we weight the overall probabilities with these odds, we are given:
(1/8) * (5/42) + (1/1) * (1/42) + (1/8) * (5/42) = 3/56.
The same holds true for option B.
option A = 3/56
option B = 3/56
option C = 1/20
However, option C should be weighted heavier because there is a 5/7 * 4/6 chance to pick two mediums. So I'm assuming from here I weight THOSE odds.
I am pretty sure I've messed up somewhere along the way, but I think I'm on the right path!
EDIT 3: More stuff.
Assuming the scale is unbalanced, the odds are (10/11) that only one of the coins is the H or L coin, and (1/11) that both coins are H/L
Therefore we can conclude:
(10 / 11) * (1/2 * 1/5) and
(1 / 11) * (1/2)
EDIT 4: Going to go ahead and say that it is a total 4/42 increase.
Hi I'm trying to run a WordPress plugin and I get the following error:
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /nfs/c03/h05/mnt/52704/domains/creathive.net/html/wp-content/plugins/qr-code-tag/lib/qrct/QrctWp.php on line 13
What would be the problem here? Line 13 is the public bit
EDIT: Here is some code:
class QrctWp
{
public $pluginName = 'QR Code Tag';
How can I do the equivalent of the Ruby snippet below using Java?
require 'net/http'
res = Net::HTTP.get_response(URI.parse("http://somewhere.com/isalive")).body
function=
def parseTitle(self, post):
"""
Returns title string with spaces replaced by dots
""
return post.xpath('h2')[0].text.replace('.', ' ')
i would to see the content of post. Tried all .
How can i properly debug the content. ir is an webstite of movies where i rip links and tittle.
So this one should parse the title.and i am sure H@ is not existing , how to print/debug it?
I want to convert a string like this:
'10/15/2008 10:06:32 PM'
into the equivalent DATETIME value in Sql Server.
In Oracle, I would say this:
TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM')
This question implies that I must parse the string into one of the standard formats, and then convert using one of those codes. That seems ludicrous for such a mundane operation. Is there an easier way?
myTree.on('click',function(node){
if(node.isLeaf())
{
Ext.Msg.alert("You are in value ",nodeValue,"whose name is",nodeName);
alert("You are in value ",nodeValue,"whose name is",nodeName);
}
});
myTree is a TreePanel. I'm getting a tree but click function is not working. I'm very new to extjs. Help me out.
Thanks in advance
I have a set of data that is structured like this:
ItemA.GroupA
ItemB.GroupA
ItemC.GroupB
ItemD.GroupC
I need to present the data in a WPF Tree View like this:
GroupA
--- ItemA
--- ItemB
GroupB
--- ItemC
GroupC
--- ItemD
What XAML can I use to group the leaves by distinct value? For instance, there could be multple items in the collection which are GroupA.ItemA, however, I only want to present the node and leaf once.
Hi! I am looking for method for parsing route path like this:
ActionController::Routing.new("post_path").parse
#=> {:controller => "posts", :action => "index"}
It should be opposite to url_for
Upd
I've found out:
http://stackoverflow.com/questions/2222522/what-is-the-opposite-of-url-for-in-rails-a-function-that-takes-a-path-and-genera
ActionController::Routing::Routes.recognize_path("/posts")
So now I need to convert posts_path into "/posts"
I'm creating a tree of folders and files in java. Windows and OSX return the system icons and name with the following code:
new JFileChooser().getIcon(File f);
new JFileChooser().getName(File f);
Is there any possibility to get the icons and name of unix systems?. A system command would be ok too.
Thanks.
Which one would you choose? My important attributes are (not in order)
Support & Future enhancements
Community & general knowledge
base (on the Internet)
Comprehensive (i.e proven to
parse a wide range of *.*ml pages)
Performance
Memory Footprint (runtime, not the code-base)
I'm looking for some regular expression to help parse my CSV file.
The file has lines of
number,number
number,number
Comment I want to skip
number,number
number,number
Ex:
319,5446
564425,87
Text to skip
27,765564
I read each line into a string and I wanted to use some regular express to make sure the line matches the pattern of (number,number). If not then don't use the line.
I have the following code:
foo :: Int -> [String] -> [(FilePath, Integer)] -> IO Int
foo _ [] _ = return 4
foo _ _ [] = return 5
foo n nameREs pretendentFilesWithSizes = do
result <- (bar n (head nameREs) pretendentFilesWithSizes)
if result == 0
then return 0 -- <========================================== here is the error
else foo n (tail nameREs) pretendentFilesWithSizes
I get an error on the line with the comment above, the error is:
aaa.hs:56:2:
parse error (possibly incorrect indentation)
I'm working with emacs, there's no spaces, and i do not understand what did i do wrong.
Hi, I'm getting this git error and I don't really get what it means, nor how I can fix it:
(v_env)[nubela@nubela-desktop searchplus]$ git pull origin master
From file:///home/nubela/Workspace/_git/searchplus
* branch master -> FETCH_HEAD
Updating 38f3d5b..fe6028c
error: Untracked working tree file 'searchplus/.project' would be overwritten by merge. Aborting
(v_env)[nubela@nubela-desktop searchplus]$
I've done the following but to no avail:
git clean -f -d
git reset --hard HEAD
Anyone can help enlighten me? Thanks :)
I've been doing a research about the best algorithm to use in creating a binary tree implementation. THe top entry in my list is nested sets. Are there any other alternative or better algorithm??
"8,5,,1,4,7,,,,7,,1,9,3,6,,,8,6,3,9,,2,5,4,,,,,3,2,,,7,4,1,1,,4,,6,9,,5,,,,5,,,1,,6,3,,,6,5,,,,7,4,,1,7,6,,,,8,,5,,,7,1,,3,9,"
I'm doing a programming challenge where i need to parse this sequence into my sudoku script.
Need to get the above sequence into 8,5,0,1,4,7,0,0,0,7,0,1,9,3,6,0,0,8.........
I tried re but without success, help is appreciated, thanks.
I need to determind when a file has been uploaded via an ftp account so i can parse the data and insert into a db.
I could do this 2 different ways, either set up a schedule or watch the directory for any change. Either option would be fine.
I'm new to the apache /php space so any keywords that i can search upon would be handy.
Thanks.
Hi,
is there any possibility to send from formtastic form value of :string field like
- semantic_form_for :project do |form|
- form.inputs do
= form.input :task_ids, :as => :string
as Array? Currently value of this field is sending as String and i'd like to no parse this string in controller.
Also, could you give me idea - if task with submitted id is not found - what is best way to catch this situation - validation in controller or what?