Search Results

Search found 1785 results on 72 pages for 'beauness round'.

Page 45/72 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • PL/SQL embedded insert into table that may not exist

    - by Richard
    Hi, I much prefer using this 'embedded' style inserts in a pl/sql block (opposed to the execute immediate style dynamic sql - where you have to delimit quotes etc). -- a contrived example PROCEDURE CreateReport( customer IN VARCHAR2, reportdate IN DATE ) BEGIN -- drop table, create table with explicit column list CreateReportTableForCustomer; INSERT INTO TEMP_TABLE VALUES ( customer, reportdate ); END; / The problem here is that oracle checks if 'temp_table' exists and that it has the correct number of colunms and throws a compile error if it doesn't exist. So I was wondering if theres any way round that?! Essentially I want to use a placeholder for the table name to trick oracle into not checking if the table exists.

    Read the article

  • Referral System PHP

    - by Liam
    I have a membership based website and im planning on implementing a referral system. My website is credit based, the idea is that if User X refers User Y, then User X gets 100 bonus credits. Has anybody built a referral system before and if so what obstacles should I bear in mind? I've had a snoop round SO tonight but couldn't find any suitable answers. My theory is to give each user a random string which is generated and stored in the DB when they sign up, The user will then be presented with a URL incl. that string which when they pass to somebody (User Z), User Z is then sent to a page, the page then uses the GET method to gather the Random string and update the DB Row they currently occupy, does this sound feasible or could it easily be breached? Thanks

    Read the article

  • Add time to a Date object in javascript

    - by baiano
    I am trying to add time to a Date object in javascript but am not getting the results that I am expecting. I am trying to pull a timer off of the page and add it to the current time to get the unix timestamp value of when the timer will hit zero. The time on the page is displayed as " HH:MM:SS ". This is what I have: time=getTimerText.split(":"); seconds=(time[0]*3600+time[1]*60+time[2])*1000; to convert the time into milliseconds. fDate=new Date(); fDate.setTime(fDate.getTime()+seconds); add the milliseconds to the javascript timestamp alert(Math.round(fDate.getTime() / 1000)); convert the javascript timestamp to a unix timestamp Since the timer is counting down I should get the same result every time i run the script, but I don't. Can anyone see what I might be doing wrong here?

    Read the article

  • How do I print the Images?

    - by user1477539
    I want to print the images of the 30 nba teams drafting in the first round. However when I tell it to print it prints out the link instead of the image. How do I get it to print out the image instead of giving me the image link. Here's my code: import urllib2 from BeautifulSoup import BeautifulSoup # or if your're using BeautifulSoup4: # from bs4 import BeautifulSoup soup = BeautifulSoup(urllib2.urlopen('http://www.cbssports.com/nba/draft/mock-draft').read()) rows = soup.findAll("table", attrs = {'class': 'data borderTop'})[0].tbody.findAll("tr")[2:] for row in rows: fields = row.findAll("td") if len(fields) >= 3: anchor = row.findAll("td")[1].find("a") if anchor: print anchor

    Read the article

  • Transform LINQ Dataset into a Matrix for export

    - by Mad Halfling
    Hi folks, I've got a data table with columns in which include Item, Category and Value (and others, but those are the only relevant ones for this problem) that I access via LINQ in a C# ASP.Net MVC app. I want to transform these into a matrix and output that as a CSV file to pull into Excel as matrix with the items down the side, the categories across the top and the values in the row cells. However, I don't know how many, or what, categories there will be in this table, nor will there always be a record for each item/category combination. I've written this by looping round, getting my "master category" list, then looking again for each item, filling in either blank or Value, depending on whether the item/category record exists, but as there are currently 27000 records in the table, this isn't as fast as I'd like. Is there a slicker and faster way I can do this, maybe via LINQ (firing into a quicker SQL statement so the DB server can do the leg-work), or will any method essentially come back to what I am doing? Thx MH

    Read the article

  • How do I tell Entity Framework that a column in a view is nullable?

    - by Ryan ONeill
    I have a view which has an Int column which is nullable (let's call it StackOverflowCount). When generating an EF model from the database, the EF designer does not recognise it as nullable and creates the column as an Int. The issue I have is that on the EF designer I have set the column to Nullable and the following error then kills the compilation; Error 3031: Problem in mapping fragments starting at line 2327: Non-nullable column MyView.StackOverflowCount in table MyView is mapped to a nullable entity property. I can get round this by opening the .edmx file in XML mode and manually editing the SQL column definition, but there is no way to do this using the designer and it gets overwritten the next time I refresh from the model from the DB. Is this 'by design' or an example of something that slipped through into EF 4.0? I'm using .Net 4.0 with EF 4.0 under VS 2010.

    Read the article

  • UITableView - centering of Sections

    - by Raj
    Hi all, I am using a table view with its style set as "Grouped". I have only 2 sections to be displayed in the table view and the table view does not occupy full iPhone screen (It has some other views with it). So I would like to display those 2 sections centered in the table view rather than displaying the sections from the top of table view. One round about way is to set header and footer of the table view appropriately. But the disadvantage of this is, each sections will be equidistant (looks awkward!). Anybody with solutions to it? Thanks, Raj

    Read the article

  • How to get time difference in milliseconds

    - by jason45
    Hi, I can't wrap my brain around this one so I hope someone can help. I have a song track that has the song length in milliseconds. I also have the date the song played in DATETIME format. What I am trying to do is find out how many milliseconds is left in the song play time. Example $tracktime = 219238; $dateplayed = '2011-01-17 11:01:44'; $starttime = strtotime($dateplayed); I am using the following to determine time left but it does not seem correct. $curtime = time(); $timeleft = $starttime+round($tracktime/1000)-$curtime; Any help would be greatly appreciated.

    Read the article

  • Are `return` and `break` useless inside a Ruby block when used as a callback?

    - by Skilldrick
    In Rails, blocks can be used as callbacks, e.g.: class User < ActiveRecord::Base validates_presence_of :login, :email before_create {|user| user.name = user.login.capitalize if user.name.blank?} end When a block is used like this, is there any use for break and return? I'm asking because normally in a block, break will break out of the loop, and return will return from the enclosing method. But in a callback context, I can't get my head round what that means. The Ruby Programming Language suggests that return could cause a LocalJumpError but I haven't been able to reproduce this in a Rails callback. Edit: with the following code I'd expect a LocalJumpError, but all the return does is stop the rest of the callback executing. class User < ActiveRecord::Base validates_presence_of :login, :email before_create do |user| return user.name = user.login.capitalize end

    Read the article

  • Border-radius bug on <a> in IE9

    - by adamyonk
    Seeing that <div> elements render border/border-radius correctly, but any <a> or <button> that has a background, border and border-radius set shows the background color or image as a square, and only the border is round. Tried setting <a> & <button> to display: block or display: inline-block but that didn't work. Is there a known workaround? Here is a link to the computed style from Webkit: https://gist.github.com/773719 Here is the computed style from IE9 dev tools:

    Read the article

  • Sharepoint Web performance optimization

    - by hertzel
    We are running on SSL on following server topology: 1 ISA (SSL Terminate/cache/proxy+AD authentication) 1 Sharepoint 1 IBM DB2 Database as enterprise/corporate DB 1 MS SQL Server as local DB We have recently optimized the caching, compression, minification, and other ASP.net best practices such as viewstate and cookie sizes, minimizing round trips, parallel connections/domain sharding and a lot more.... Now we are not convinced that the we are in an optimized position as the network resources i.e. bandwidth and especially latency are out of our control!! The client/browser to server/sharepoint is trans-Atlantic i.e. (ASIA, USA, EUROPE). As of my understanding the only ways to improve the network (latency) are: - TCP/SSL optimization - hardware/software? - CDNs - cloud or our own ? Your opinion and insights would be much appreciated Best regards Hertzel

    Read the article

  • Embarassing C++ question regarding const

    - by Neil Butterworth
    My comments on this answer got me thinking about the issues of constness and sorting. I played around a bit and reduced my issues to the fact that this code: #include <vector> int main() { std::vector <const int> v; } will not compile - you can't create a vector of const ints. I suppose I should have known this, but I've never needed to create such a thing before. However, it seems like a useful construct to me, and I wonder if there is any way round this problem - I want to add things to a vector (or whatever), but they should not be changed once added. There's probably some embarrassingly simple solution to this, but it's something I'd never considered before.

    Read the article

  • How to submit an app that uses an iOS6 feature?

    - by Darren
    I'm ready to submit my app to apple, however it says on the iOS Dev portal that xCode 4.5 cannot be used to submit apps yet, use the public release. xCode 4.4 wont compile my project because I am using -(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskPortrait; } which is the new way to support orientation changes. It seems strange with iOS6 round the corner that I cannot submit this. Must I remove this and submit, then resubmit to support iOS6 when they allow it, or has anyone successfully submitted from xCode 4.5 beta 4? Thanks

    Read the article

  • Bootstrap jquery methods Magento's prototype lib

    - by user1722527
    Wonder if anyone has had this issue. I've integrated Bootstrap nicely into a Magento theme I'm building, all good. That is, until I try using the accordian functions. There seems to be an issue with the code finding the Prototype Libs Methods instead of jQuery's. I've tried the usual fixes, $ - jQuery and no conflict but it only works when I disable the prototype lib - which obviously is not good. Anyone out there come across this and can advise me on a work round? At the moment I'm resigned to using Scriptaculous for the accordian.

    Read the article

  • High performance distributed asynchronous RPC in java

    - by unludo
    I would like to do RPC to a list of clients with the following requirements: the server does not know the clients (implies a kind of broker?) and the cleints do not know the server there may be several clients - they share the load to treat the RPC The RPC is asynchronous very fast (round-trip < 1ms) optional : offers a fail-over mechanism. It can be done with underlying tools which are not really intended for that (Hazelcast is an example). What would you use for such requirements? Thanks!

    Read the article

  • How does linq decide between inner & outer joins

    - by user287795
    Hi Usually linq is using an left outer join for its queries but on some cases it decides to use inner join instead. I have a situation where that decision results in wrong results since the second table doesn't always have suitable records and that removes the records from the first table. I'm using a linqdatasource over a dbml where the relevant tables are identical but one holds historical records removed from the first. both have the same primary key. and I'm using a dataloadoption to load both tables at once with out round trips. Would you explain why linq decided to use an inner join here? Thanks

    Read the article

  • Multiple dropdowns, combination check and filter

    - by Tom
    Using Javascript / jQuery, I'm trying to build a "combination checker" that will take the values of three (but can be more) dropdown lists and filter the options based on a supplied list of allowed combinations. For example: DROPDOWNS Field 1: - value_1 - value_2 Field 2: - value_3 Field 3: - value_4 - value_5 COMBINATIONS - value_1, value_3, value_5 - value_1, value_3, value_4 - value_2, value_3, value_5 When a user selects Field 3 - value_4, the unavailable options will be disabled - ie, Field 1 - value_2 (there is no combination that allows value_2 and value_4 to be selected together). It would be really great if someone could provide some pointers on how this can be achieved or just provide a fresh perspective - I'm going round in circles on this one!

    Read the article

  • Can I stagger UpdatePanel updates in .NET?

    - by cusimar9
    I have a situation in which I select an account and I want to bring back its details. This is a single UpdatePanel round trip and its quite quick. In addition, I need to bring back some transactional information which is from a much bigger table and takes a couple of seconds for the query to come back. Ideally, I would like to put this into a second update panel and update this additional information once it has been received, but after the first update panel has updated i.e. the user sees: Change account See account details (almost instant) See transactional info (2 seconds later) The only way I can think of doing this is to use javascript to cause a SECOND postback once the account details have been retrieved to get the transaction information. Is there a better way?

    Read the article

  • c++ Mixing printf, cout with wprintf, wcout

    - by Bo Jensen
    I know you should not mix printing with printf,cout and wprintf,wcout, but have a hard time finding a good answer why and if it is possible to get round it. The problem is I use a external library that prints with printf and my own uses wcout. If I do a simple example it works fine, but from my full application it simply does not print the printf statements. If this is really a limitation, then there would be many libraries out there which can not work together with wide printing applications. Any insight on this is more than welcome.

    Read the article

  • How to get at TCP RTT on Windows (Linux TCP_INFO) as an user

    - by FredAlkin
    I am porting a streaming TCP app from Linux to Windows. The app streams real-time audio data using a preexisting TCP protocol (so switching to UDP isn't an option). Further, I wish to avoid being "part of the problem" and requiring Administrator rights. The Linux code uses getsockopt(... ,SOL_TCP, TCP_INFO, ..) to get the RTT (round trip time) information from the TCP connection. The application level uses this to throttle the amount of data sent over the connection (apparently to balance quality with latency). Is there an equivalent to TCP_INFO on WIndows? (google tells me that Win2K and later supports "TCP Timestamps" which would provide this information, but I've yet to find a way to get at it. Thanks in advance.

    Read the article

  • C# Anyway to detect if an object is locked.

    - by scope-creep
    Hi, Is their anyway to determine if a object is locked in c#. I have the unenviable position, through design where i'm reading from a queue inside a class, and I need to dump the contents into a collection in the class. But that collection is also read/write from an interface outside the class. So obviously their may be a case when the collection is being written to, as the same time i want to write to it. I could program round it, say using delegate but it would be ugly. Bob.

    Read the article

  • Domain entities into (ASP.NET) Session, or better some kind of DTOs?

    - by Robert
    Currently we put Domain Objects into our ASP.NET Sessions. Now we considering moving from InProc sessions to state server. This requires that all objects inside session are serializable. Instead to annotate all objects with the [Serializable] attribute, we thought about creating custom-session objects (DTO Session Objects?), which only contain the information we need: CONS: Entities must be reloaded, which requires additional DB round-trips PROS: Session State is smaller Session information is more specific (could be a CON) No unneeded annotation of Domain-Entities What do you think? Should we use some kind of DTOs to store inside the session, or should we stick with god old entities?

    Read the article

  • .Net MVC - Restful URL's - The specified path, file name, or both are too long. The fully qualified

    - by Truegilly
    Hello, im creating a MVC application thats following a restfull URL approach Im am experiencing the following error... "The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters." This error occurs when my URL length = 225 chars. Surly I can have much longer URL's without this problem and doesn’t this relate to file paths rather than URL's ? Im sure some of you MVC guys have experienced this ;) is there a way round it ?? where am i going wrong ?? thank you for your time Truegilly

    Read the article

  • Searching for URL's Relative to Site Root in Javascript Source

    - by James
    Hi, I am working on a web site with several other developers and we have had problems where people commit JavaScript code with AJAX calls that use URL's relative to the site root. An example would be /Home/Index which will not work if the site is hosted in a virtual directory. To get round the problem we use a $.url() method to convert it to a full path, e.g. $("#container").load($.url("/Home/Index")) I am trying to write a unit test that will search each JavaScript file and find places where the $.url method is not being used. The only problem is that I cannot seem to write a regex expression to do this. I have tried the following: (?!\$\.url\()"(/\w*)+" But this does not work. I cannot find a way to say that I don't want the $.url in front. Does anyone know if this is possible? Note that I need regular expressions that are compatible with .NET Thanks.

    Read the article

  • Display random image when page loads without utilizing onload in the body tag

    - by Peachy
    I'm trying to create a fairly simple piece of JavaScript that displays a random image from an array each time the page loads. I need to figure out a way to get this running without adding code to the body tag. Is there a way to accomplish this without, say, an onload funtion placed in the body tag? Here's what I have that relies on the onLoad: ImageSwitch=new Array(); ImageSwitch[0]='1.jpg'; ImageSwitch[1]='2.jpg'; ImageSwitch[2]='3.jpg'; ImageSwitch[3]='4.jpg'; function swapImage() { document.getElementById("theImage").setAttribute("src", ImageSwitch[ Math.round(Math.random()*3)]) } Any alternative ideas to accomplish this? Thanks.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >