Is it possible to build a music player in assembly (I'm thinking along the lines of NASM)? What are the obstacles one might face in the process of building one?
I have one very surprising issue with Google Fonts. This is the site in question.
The title is normaly showing in one ligne but a friend of mine with the same Opera version like me sent me this screenshot. You can see that the title goes in two lines and brakes every think.
It's the first time I use Gfonts and must admit that there is another problem in Firefox too - the font appears so jagged!
Thanks for your advises!
I have an object with a couple of DateTime properties:
public DateTime Start_Date { get; set; }
public DateTime? End_Date { get; set; }
I would like to set a format for each of these, along the lines of
Start_Date.ToString("M/d/yyyy hh:mm tt")
Do I have to code the get, or is there an elegant way to do this?
I'v created a Notepad-like application and if I load a 1MB file into the textbox, it takes about 1 minute. The Visual Studio Binary editor displays lines, Hex, and ascii versions in a fraction of a second. How do they get the data into the textbox so quickly?
Thanks
I'm recently change my data table, I remove column and add a new column that define as identity = True and identity seed = 1, identity increment = 1.
When i tried to insert data to this table by STORE PROCEDURE i get this exception:
An explicit value for the identity column in table 'AirConditioner' can only be specified when a column list is used and IDENTITY_INSERT is ON.
I saw that i need to add this lines:
SET IDENTITY_INSERT [dbo].[AirConditioner] ON and finally OFF
I added and its still throw an exception...
My store procedure is attached as a picture
I have lines of data which I want to parse.
The data looks like this:
a score=216 expect=1.05e-06
a score=180 expect=0.0394
What I want to do is to have a subroutine
that parse them and return 2 values (score and expect) for
each line.
However this function of mine doesn't seem to work:
def scoreEvalFromMaf(mafLines):
for word in mafLines[0]:
if word.startswith("score="):
theScore = word.split('=')[1]
theEval = word.split('=')[2]
return [theScore, theEval]
raise Exception("encountered an alignment without a score")
Please advice what's the right way to do it?
Hi,
I only want a simple Splash Screen Example.
Get the Code, Insert my picture, add 2 lines of code to load and finish.
But all I can google is so complex, that is too much. I only want a form with a picture that goes more and more transparent until it hides automaticly and my window is shown.
I tried the "prettygoodsplashscreen" from Codeproject, but don't work for me.
Lang is c#.net 2.0
A symptom of the problem is that the call stack is empty in the "Debug" tab in Eclipse. Usually it will have a list of all the way up the call stack, but now it just says "breakpoint at line 68..." and then about 10 blank lines.
I am trying to write a pre-qualification programming exam, hopefully using Google Forms... however they seem to be unable to do new-lines in both the questions and the section headers...
My current format is new page for each question, with a "section header" as the main question (because it has a textarea for the "code snippet") and a "multiple choice question" as the ummm... question answer...
Help much appreciated...
Let's say I want to make a little wrapper along the lines of:
def wrapper(f: (Any) => Any): Any = {
println("Executing now")
val res = f
println("Execution finished")
res
}
wrapper {
println("2")
}
Does this make sense? My wrapper method is obviously wrong, but I think the spirit of what I want to do is possible. Am I right in thinking so? If so, what's the solution? Thanks!
This is the code I have so far
d = {}
counter = 0
for lines in words:
counter += 1
for word in text1:
if word not in words:
d[word] = [counter]
else:
d[word].append(counter)
print(word, d[counter])
words = my text file
text1 is my misspelled words
But this gives me an error. What I want to do is print the word and the line number e.g.
togeher 5 7
In my .gvimrc I have following lines:
set listchars=tab:\.\ ,trail:-
set softtabstop=2
set shiftwidth=2
set tabstop=2
set expandtab
When I change last line to set noexpandtab the indents can be seen and marked with .
Is there a way to make vim treat expanded tabs like "normal" tab so that list option works as expected?
I'm trying to put some code examples in a pdf, but copying them out messes up the formatting and rearranges the lines, there's a lot of manual cleanup needed after pasting.
Is there a equivalent to html's pre for PDFs? For "this" block of text respect line breaks, spacing, and copy as plain text like its shown. The closest thing I can see is adding note annotations next to every code example.
I have a script that generates two lines as output each time. I'm really just interested in the second line. Moreover I'm only interested in the text that appears between a pair of #'s on the second line. Additionally, between the hashes, another delimiter is used: ^A. It would be great if I can also break apart each part of text that is ^A-delimited (Note that ^A is SOH special character and can be typed by using Ctrl-A)
Since it now seems to have replaced TestUnit in 1.9.1, I can't seem to find an equivalent to this. There ARE times when you really just want a method to run once for the suite of tests.
For now I've resorted to some lovely hackery along the lines of:
Class ParseStandardWindTest < MiniTest::Unit::TestCase
@@reader ||= PolicyDataReader.new(Time.now)
@@data ||= @@reader.parse
def test_stuff
transaction = @@data[:transaction]
assert true, transaction
end
end
I know that this won't directly invert a colour, it will just 'oppose' it. I was wondering if anyone knew a simple way (a few lines of code) to invert a colour from any given colour?
At the moment I have this (which isn't exactly the definition of an invert):
const int RGBMAX = 255;
Color InvertMeAColour(Color ColourToInvert)
{
return Color.FromArgb(RGBMAX - ColourToInvert.R,
RGBMAX - ColourToInvert.G, RGBMAX - ColourToInvert.B);
}
in my .htaccess i've got these lines:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
i tried to include js files with this line:
<script type="text/javascript" src="system/application/media/js/jquery/jquery.js"></script>
but it doesnt work since the rules dont let it pass. it works when i turn the rewrite engine off.
how can i change the rules so it allows url with a /js, /css and /img?
thanks
I'm looking for a way to determine the differences between two strings, and highlight them in both strings.
I would suspect that most 'diff' programs won't work since they show differenes in lines (I believe).
Thanks,
Mark
I use the following snippet to filter the list of selected users, where isSelected is a boolean variable. Is there a simpler way (helper function) to populate the selectedUsers collection instead of writing the following lines of code.
List<User> selectedUsers = new ArrayList<User>(0);
for (User user : this.getUsers()) {
if (user.isSelected()) {
selectedUsers.add(user.getId());
}
}
Is there a way in SQL Server to parition over a date range?
I'm looking for something along these lines:
SELECT ROW_NUMBER() OVER (PARTITION BY RANGE(DateTimeField) INTERVAL(1))
I want to group rows that are within one day of each other.
Hi,
is there any simple way to extrude a 2d geomtry (vectors ) to a 3d shape
assuming extruding parameter are lenght (double) and angle (degree)
so it should render like a cone ( all z lines going to one point )
Hi i am working on some high resolution display features in which have to draw the vertical line , i am using Moveto() and lineTO() , but it is much time taking...
can anyone suggest me , what we can use instead of it ...to optimize the performance...
see the scene is , in order to draw 100 Vertical lines it is taking 84ms time, we need to reduce it to 5 ms something..
please refer me any alternate fot that.
Thanks,
Mukesh
I want to generate a bat file for multiple tag processing and the command lines look like this:
"C:\Program Files (x86)\tools\tag.exe" -t Genre="%genre%" "%_folderpath%\%track%. %title%.%_extension%"
IF ERRORLEVEL==1 PAUSE
I can populate all variables automatically but can I replace the %title% variable with a wildcard?