Search Results

Search found 1867 results on 75 pages for 'insane 36'.

Page 21/75 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • SEC_TO_TIME() convert to java.sql.Time error

    - by chun
    hi I have a aggregate column present the microsecond, a report(with jasper) have to show HH:mm:ss of this indicator What I did is using SEC_TO_TIME(sum(col)/1000) , but when mapping to java.sql.Time, i doesn't work when the value of hour in result pass over 24(ex:36:33:33) Then I think another way, not using sec_to_time, just mapping the microsecond as Bigdecimal, but dunno what java class shoud i use to format date as the default format of hh:mm:ss is limit to 24...?

    Read the article

  • Gnuplot - splot matrix csv data

    - by Jakub Czaplicki
    How can I plot (a 3D plot) a matrix in Gnuplot having such data structure. I cannot find a way to use the first row and column as a x and y ticks (or to ignore them) ,5,6,7,8 1,-6.20,-6.35,-6.59,-6.02 2,-6.39,-6.52,-6.31,-6.00 3,-6.36,-6.48,-6.15,-5.90 4,-5.79,-5.91,-5.87,-5.46 Is the splot 'data.csv' matrix the correct parameter to use ?

    Read the article

  • JS text to array

    - by Sonny
    Hi i got this text 2/92/20 3/32/32 4/62/6 5/22/28 6/60/61 7/33/32 8/34/31 9/31/19 10/19/19 11/34/39 12/32/32 14/19/25 15/45/37 16/32/32 17/84/36 18/72/33 and i need it to be like // 2/92/20 chars[0][0]=2; chars[0][1]=92; chars[0][2]=20; How should i make that PS: the split must be in $.ajax({ type: "POST", url: "char_info2.php", dataType: "html", success: function(data) { //here }

    Read the article

  • Django - Can you use property as the field in an aggregation function?

    - by orokusaki
    I know the short answer because I tried it. Is there any way to accomplish this though (even if only on account of a hack)? class Ticket(models.Model): account = modelfields.AccountField() uuid = models.CharField(max_length=36, unique=True) created = models.DateTimeField(auto_now_add=True) class Meta: ordering = ['created'] @property def repair_cost(self): # cost is a @property of LineItem(models.Model) return self.lineitem_set.aggregate(models.Sum('cost'))

    Read the article

  • Iterating through list of keys for associative array in JSON

    - by Simon_Weaver
    I have an associative array in JSON var dictionary = {"cats":[1,2,37,38,40,32,33,35,39,36], "dogs", [4,5,6,3,2]}; Can I get the keys from this? I tried in Visual studio putting a breakpoint but can't see any property that represents keys. Is it not possible? I'm fine creating a separate array if necessary, but was just hoping it wasnt : var keys = ["cats", "dogs"];

    Read the article

  • logback - no end of line delimiter

    - by binary_runner
    I'm using logback 0.9.21 . Unfortunately it prints all messages to single line, there is no end of line character, even wrong one. I've got the pattern set right AFAIK: <pattern>%d{HH:mm:ss.SSS} %-5level %class (%thread) [%logger{36}] -- %msg%n</pattern> What's the catch?

    Read the article

  • WPF ClickOnce Bootstrap Dection Failure on One Machine

    - by Dexter Morgan
    Hello Friend, I've decided to use ClickOnce technology to deploy my new WPF application. By and large, ClickOnce works as advertised but I've hit a minor glitch regarding Bootstrapping and framework detection. Some background: - I'm using the standard Visual Studio-generated publish.htm page as my launch page. - The only prerequisite is the .NET Framework 4.0 Client Profile. - All clients using IE 8. - All clients already have the .NET 4.0 Client Profile installed. ClickOnce works as advertised on the vast majority of machines. The VS-generated JScript correctly detects that the framework is installed and presents the user with a Run button. The app launches just fine. I'm getting odd results on one of the machines, however. On the offending machine, the VS-generated JScript tells the user that the prereqs may not be installed -- or rather, it FAILS to detect that the framework is already installed. The "launch" link successfully launches the application but the Run link points to the bootstrapper setup.exe. Why is it failing to detect the framework on this one machine? It occurred to me that framework detection is largely a matter of examining the useragent string that's submitted by the browser. So, what you see below are two UserAgent strings. The first is from a machine where things are working properly. The second is from the offending machine. THIS ONE WORKS: 2011-01-11 15:14:14 W3SVC1 192.168.0.36 GET /publish.htm - 80 - 72.130.187.100 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+3.5.21022;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C) 304 0 0 THIS ONE DOESN'T: 2011-01-11 18:49:12 W3SVC1 192.168.0.36 GET /publish.htm - 80 - 76.212.204.169 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.1;+WOW64;+Trident/4.0;+GTB6.6;+SLCC2;+.NET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+Media+Center+PC+6.0;+.NET4.0C) 200 0 0 The useragent string of both machines clearly states, "hey the .NET 4.0 client profile is installed here" -- yet the second machine seems unable to detect it. I don't know enough about useragent strings to understand why the former works and the latter fails. The only difference as far as I can tell is that the offending machine is running 64bit. But that shouldn't make a difference. Should it? Any ideas? Dexter Morgan

    Read the article

  • Get value of "data"

    - by Nicole Loyal-Windham
    Hi, I need to figure out the value of data strings with jquery, for example like this: { label: "Beginner", data: 2}, { label: "Advanced", data: 12}, { label: "Expert", data: 22}, to add them up. Something like: var sum = data1+data2+data3; alert(sum); So the result for this example would be 36. Appreciate your help! Nicole

    Read the article

  • Convert file to html table with PERL

    - by user329313
    Hi everyone, I am trying to write a simple Perl CGI script that: -runs a CLI script -reads the resulting .out file and converts the data in the file to an HTML table. Here is some sample data from the .out file: 10.255.202.1 2472327594 1720341 10.255.202.21 2161941840 1484352 10.255.200.0 1642646268 1163742 10.255.200.96 1489876452 1023546 10.255.200.26 1289738466 927513 10.255.202.18 1028316222 706959 10.255.200.36 955477836 703926 Any help would be much appreciated. -Sebastian

    Read the article

  • 6^x = 5 equation, how to solve it?

    - by Tom
    If it would be 6^x = 1 or 6^x = 6 or 6^x = 36 it would be extremely easy, but how to solve this equation: 6^x = 5 I don't need an answer, I want to find out how to solve equations like this one, I need solution. Thanks.

    Read the article

  • Regular expressions in c++ STL

    - by Radek Šimko
    Is there any native library in STL which is tested and works without any extra compiler options? I tried to use <regex>, but the compiler outputs this: In file included from /usr/include/c++/4.3/regex:40, from main.cpp:5: /usr/include/c++/4.3/c++0x_warning.h:36:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.

    Read the article

  • Programatically created UITableViewCell subclass only working on highlight

    - by squarefrog
    I've created a subclass of UITableViewCell but I'm struggling to get it to work properly. If I use UITableViewStyleDefault then the class only works when highlighted. If I use UITableViewStyleValue1 then it mostly works but I'm unable to change label fonts much. I tried researching but it seems everyone is doing this via a .xib file, but not programatically. Implementation file #import "ASCustomCellWithCount.h" @implementation ASCustomCellWithCount @synthesize primaryLabel,secondaryLabel,contentCountImage,contentCount; - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { // Initialization code contentCountImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed: @"tableCount.png"] ]; primaryLabel = [[UILabel alloc] init]; primaryLabel.textAlignment = UITextAlignmentLeft; primaryLabel.textColor = [UIColor blackColor]; primaryLabel.font = [UIFont systemFontOfSize: 20]; primaryLabel.backgroundColor = [UIColor clearColor]; secondaryLabel = [[UILabel alloc] init]; secondaryLabel.textAlignment = UITextAlignmentLeft; secondaryLabel.textColor = [UIColor blackColor]; secondaryLabel.font = [UIFont systemFontOfSize: 8]; secondaryLabel.backgroundColor = [UIColor clearColor]; contentCount = [[UILabel alloc] init]; contentCount.textAlignment = UITextAlignmentCenter; contentCount.font = [UIFont boldSystemFontOfSize: 15]; contentCount.textColor = [UIColor whiteColor]; contentCount.shadowColor = [UIColor blackColor]; contentCount.shadowOffset = CGSizeMake(1, 1); contentCount.backgroundColor = [UIColor clearColor]; [self.contentView addSubview: contentCountImage]; [self.contentView addSubview: primaryLabel]; [self.contentView addSubview: secondaryLabel]; [self.contentView addSubview: contentCount]; } return self; } - (void)layoutSubviews { [super layoutSubviews]; CGRect contentRect = self.contentView.bounds; // CGFloat boundsX = contentRect.origin.x; primaryLabel.frame = CGRectMake(0 ,0, 200, 25); secondaryLabel.frame = CGRectMake(0, 30, 100, 15); contentCount.frame = CGRectMake(contentRect.size.width - 48, contentRect.size.height / 2 - 13, 36, 24); contentCountImage.frame = CGRectMake(contentRect.size.width - 48, contentRect.size.height / 2 - 12, 36, 24); } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } - (void)dealloc { [primaryLabel release]; [secondaryLabel release]; [contentCountImage release]; [contentCount release]; } @end And then to create the cell I use - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; ASCustomCellWithCount *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[ASCustomCellWithCount alloc] initWithStyle: UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; } cell.textLabel.text = [NSString stringWithFormat:@"%@", [tempArray objectAtIndex: indexPath.row]]; cell.contentCount.text = @"49"; return cell; }

    Read the article

  • What's wrong with this statement in perl?

    - by benjamin button
    print "$_", join(',',sort keys %$h),"\n"; It's giving me an error below: Use of uninitialized value in string at missing_months.pl line 36. 1,10,11,12 this print statement is present in a for loop as below: foreach my $num ( sort keys %hash ) { my $h = $hash{$num}; print "$_", join(',',sort keys %$h),"\n"; }

    Read the article

  • Problem with skipping empty cells while importing data from .xlsx file in asp.net c# application

    - by Eedoh
    Hi to all. I have a problem with reading .xlsx files in asp.net mvc2.0 application, using c#. Problem occurs when reading empty cell from .xlsx file. My code simply skips this cell and reads the next one. For example, if the contents of .xlsx file are: FirstName LastName Age John 36 They will be read as: FirstName LastName Age John 36 Here's the code that does the reading. private string GetValue(Cell cell, SharedStringTablePart stringTablePart) { if (cell.ChildElements.Count == 0) return string.Empty; //get cell value string value = cell.ElementAt(0).InnerText;//CellValue.InnerText; //Look up real value from shared string table if ((cell.DataType != null) && (cell.DataType == CellValues.SharedString)) value = stringTablePart.SharedStringTable.ChildElements[Int32.Parse(value)].InnerText; return value; } private DataTable ExtractExcelSheetValuesToDataTable(string xlsxFilePath, string sheetName) { DataTable dt = new DataTable(); using (SpreadsheetDocument myWorkbook = SpreadsheetDocument.Open(xlsxFilePath, true)) { //Access the main Workbook part, which contains data WorkbookPart workbookPart = myWorkbook.WorkbookPart; WorksheetPart worksheetPart = null; if (!string.IsNullOrEmpty(sheetName)) { Sheet ss = workbookPart.Workbook.Descendants<Sheet>().Where(s => s.Name == sheetName).SingleOrDefault<Sheet>(); worksheetPart = (WorksheetPart)workbookPart.GetPartById(ss.Id); } else { worksheetPart = workbookPart.WorksheetParts.FirstOrDefault(); } SharedStringTablePart stringTablePart = workbookPart.SharedStringTablePart; if (worksheetPart != null) { Row lastRow = worksheetPart.Worksheet.Descendants<Row>().LastOrDefault(); Row firstRow = worksheetPart.Worksheet.Descendants<Row>().FirstOrDefault(); if (firstRow != null) { foreach (Cell c in firstRow.ChildElements) { string value = GetValue(c, stringTablePart); dt.Columns.Add(value); } } if (lastRow != null) { for (int i = 2; i <= lastRow.RowIndex; i++) { DataRow dr = dt.NewRow(); bool empty = true; Row row = worksheetPart.Worksheet.Descendants<Row>().Where(r => i == r.RowIndex).FirstOrDefault(); int j = 0; if (row != null) { foreach (Cell c in row.ChildElements) { //Get cell value string value = GetValue(c, stringTablePart); if (!string.IsNullOrEmpty(value) && value != "") empty = false; dr[j] = value; j++; if (j == dt.Columns.Count) break; } if (empty) break; dt.Rows.Add(dr); } } } } } return dt; }

    Read the article

  • Calculate the SUM of the Column which has Time DataType:

    - by thevan
    I want to calculate the Sum of the Field which has Time DataType. My Table is Below: TableA: TotalTime ------------- 12:18:00 12:18:00 Here I want to sum the two time fields. I tried the below Query SELECT CAST( DATEADD(MS, SUM(DATEDIFF(MS, '00:00:00.000', CONVERT(TIME, TotalTime))), '00:00:00.000' ) AS TOTALTIME) FROM [TableA] But it gives the Output as TOTALTIME ----------------- 00:36:00.0000000 But My Desired Output would be like below: TOTALTIME ----------------- 24:36:00 How to get this Output?

    Read the article

  • Nested WHILE loops not acting as expected - Javascript / Google Apps Script

    - by dthor
    I've got a function that isn't acting as intended. Before I continue, I'd like preface this with the fact that I normally program in Mathematica and have been tasked with porting over a Mathematica function (that I wrote) to JavaScript so that it can be used in a Google Docs spreadsheet. I have about 3 hours of JavaScript experience... The entire (small) project is calculating the Gross Die per Wafer, given a wafer and die size (among other inputs). The part that isn't working is where I check to see if any corner of the die is outside of the effective radius, Reff. The function takes a list of X and Y coordinates which, when combined, create the individual XY coord of the center of the die. That is then put into a separate function "maxDistance" that calculates the distance of each of the 4 corners and returns the max. This max value is checked against Reff. If the max is inside the radius, 1 is added to the die count. // Take a list of X and Y values and calculate the Gross Die per Wafer function CoordsToGDW(Reff,xSize,ySize,xCoords,yCoords) { // Initialize Variables var count = 0; // Nested loops create all the x,y coords of the die centers for (var i = 0; i < xCoords.length; i++) { for (var j = 0; j < yCoords.length, j++) { // Add 1 to the die count if the distance is within the effective radius if (maxDistance(xCoords[i],yCoords[j],xSize,ySize) <= Reff) {count = count + 1} } } return count; } Here are some examples of what I'm getting: xArray={-52.25, -42.75, -33.25, -23.75, -14.25, -4.75, 4.75, 14.25, 23.75, 33.25, 42.75, 52.25, 61.75} yArray={-52.5, -45.5, -38.5, -31.5, -24.5, -17.5, -10.5, -3.5, 3.5, 10.5, 17.5, 24.5, 31.5, 38.5, 45.5, 52.5, 59.5} CoordsToGDW(45,9.5,7.0,xArray,yArray) returns: 49 (should be 72) xArray={-36, -28, -20, -12, -4, 4, 12, 20, 28, 36, 44} yArray={-39, -33, -27, -21, -15, -9, -3, 3, 9, 15, 21, 27, 33, 39, 45} CoordsToGDW(32.5,8,6,xArray,yArray) returns: 39 (should be 48) I know that maxDistance() is returning the correct values. So, where's my simple mistake? Also, please forgive me writing some things in Mathematica notation... Edit #1: A little bit of formatting. Edit #2: Per showi, I've changed WHILE loops to FOR loops and replaced <= with <. Still not the right answer. It did clean things up a bit though... Edit #3: What I'm essentially trying to do is take [a,b] and [a,b,c] and return [[a,a],[a,b],[a,c],[b,a],[b,b],[b,c]]

    Read the article

  • sql server query/subquery question

    - by parminder
    Hi Experts, I have a tables with data like this Id BookId TagId 34 113421 9 35 113421 10 36 113421 11 37 113421 1 38 113422 9 39 113422 1 40 113422 12 I need to write a query (SQL Server) which gives me data according to the tags say if I want bookIds where tagid =9 it should return bookid 113421 and 113422 as it exists in both the books, but If I ask data for tags 9 and 10 it should return only book 113421 as that is the only book where both the tags are present. Thanks Parminder

    Read the article

  • How to calculate

    - by Bob
    Hi, I hv a table like this :- Item Qty Price A Price B abc 5 36.00 0 qwe 8 0 48.00 zxc 6 12.00 0 poi 4 10.00 0 lkj 9 12.00 0 mnb 3 0 14.00 vfr 7 0 6.00 How can I sum the value using SQL ie. if Price A is zero, it will pick Price B. The expected results will be as follows :- Item Value abc 180.00 qwe 384.00 zxc 72.00 poi 40.00 lkj 36.00 mnb 42.00 vfr 42.00

    Read the article

  • c++ recursion with arrays

    - by Sam
    I have this project that I'm working on for a class, and I'm not looking for the answer, but maybe just a few tips since I don't feel like I'm using true recursion. The problem involves solving the game of Hi Q or "peg solitaire" where you want the end result to be one peg remaining (it's played with a triangular board and one space is open at the start.) I've represented the board with a simple array, each index being a spot and having a value of 1 if it has a peg, and 0 if it doesn't and also the set of valid moves with a 2 dimensional array that is 36, 3 (each move set contains 3 numbers; the peg you're moving, the peg it hops over, and the destination index.) So my problem is that in my recursive function, I'm using a lot of iteration to determine things like which space is open (or has a value of 0) and which move to use based on which space is open by looping through the arrays. Secondly, I don't understand how you would then backtrack with recursion, in the event that an incorrect move was made and you wanted to take that move back in order to choose a different one. This is what I have so far; the "a" array represents the board, the "b" array represents the moves, and the "c" array was my idea of a reminder as to which moves I used already. The functions used are helper functions that basically just loop through the arrays to find an empty space and corresponding move. : void solveGame(int a[15], int b[36][3], int c[15][3]){ int empSpace; int moveIndex; int count = 0; if(pegCount(a) < 2){ return; } else{ empSpace = findEmpty(a); moveIndex = chooseMove( a, b, empSpace); a[b[moveIndex][0]] = 0; a[b[moveIndex][1]] = 0; a[b[moveIndex][2]] = 1; c[count][0] = b[moveIndex][0]; c[count][1] = b[moveIndex][1]; c[count][2] = b[moveIndex][2]; solveGame(a,b,c); } }

    Read the article

  • rewrite all requests from one folder to a parent folder htaccess

    - by Neo
    This one has me stumped, I need to re-write all requests to the javascript folder (js) to a special library handler system. e.g. rewrite http://localhost/admin/js/bar.js --> http://localhost/_lib/=admin/js/bar.js Any ideas? I have tried the following which creates an error RewriteCond %{REQUEST_URI} ^(.*)$ RewriteRule ^(.*)$ /%1/_lib/$1 [NC] (36)File name to long: cannot map GET /admin/js/bar.js to file

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >