text stringlengths 8 267k | meta dict |
|---|---|
Q: In Linq to EF 4.0, I want to return rows matching a list or all rows if the list is empty. How do I do this in an elegant way? This sort of thing:
Dim MatchingValues() As Integer = {5, 6, 7}
Return From e in context.entity
Where MatchingValues.Contains(e.Id)
...works great. However, in my case, the values in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614713",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: LI elements have float left to be aligned to the right in a container? In this code the LI elements have float:left and are aligned to the left of the container. I want to make them aligned to the right. How do I do this with CSS?
For example:
[..................................Item1.Item2]
Here is the HTML code:
<d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614717",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: connection failed : Bad Url (null) error while sending POST data from Xcode to classic ASP page. In my iphone project, I need to pass member Id and pwd to a web server. I have tried my code with Synchronous as well as asynchronous request but I always get error : connection failed: Bad URL (null). can any one please... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614718",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I resize and paintComponent inside a frame Write a program that fills the window with a larrge ellipse. The ellipse shoud touch the window boundaries, even if the window is resized.
I have the following code:
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.El... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614722",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: WAP, How to Publish to Web with Web Deploy? I want to publish my web application on a hosting server.
Domain: mysite.com
Folder: mysite.com/TestWAP
*
*Can I use one-click deployment on typical discount shared hosting?
*Will I need to make any installation on the server first, and how is
this done?
*With ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614727",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Android - EditText as search box doesn't work I would like to enable search functionality to EditText. My requirement is like this:
when someone types with some letter, suppose the user types 'a', then it should show all the words which starts with 'a' should be shown as a drop down list. For example, if I first typ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614736",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: EntityFramework SQL Server 2000?
Possible Duplicate:
Entity Framework v2 doesn't support sql 2000?
I have a windows forms application that access a SQL Server 2000 server. Originally this application was written with Visual Studio 2008. Since then we have migrated to Visual Studio 2010 and when I try to add new... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614748",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to use Facebook Application to write a notification to Users i'm developing an application for a university exam, using Appengine and Gwt (Google products) and i'd like to implement Facebook this way:
- give the ability to a FB user to login to the application through facebook (did this implementing the oAuth2.0... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614749",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to synchronize access to a global variable with very frequent reads / very rare writes? I’m working on debug logging infrastructure for a server application. Each logging point in source code specifies its level (CRITICAL, ERROR, etc.) among other parameters.
So in source code logging point looks as:
DBG_LOG_HIG... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How do I send an AJAX request upon page unload / leaving? window.onbeforeunload = function() {
return $j.ajax({
url: "/view/action?&recent_tracking_id=" + $recent_tracking_id + "&time_on_page=" + getSeconds()
});
}
this what I have, but it returns an alert with [object Object]
how do I just execute ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614756",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Convert List to Dictionary > I would like to take a list of objects and convert it to a dictionary where the key is a field in the object, and the value is a list of a different field in the objects that match on the key. I can do this now with a loop but I feel this should be able to be accomplished with linq and n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614758",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Fastest .NET way to retrieve the most metadata from files in a remote network share? Of the available .NET System.IO methods/classes, what is the most efficient way to retrieve an entire directory listing on a remote network share (assume a slow, non-LAN speed link)?
For 10,000+ files, need to grab:
*
*Name
*Siz... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614759",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Get unique count by matchin partial string in logs I want to find out how many users have blue colors & how many of them have red color for all unique users?
[2011-09-30 18:15:01:559 GMT+00:00][137D3B5A5F196F81A405858E6A5AA01F.maps-358-thread-1][com.abc.myaction.myfilter] INFO email=abc@hotmail.com userid=1234
[2011... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614760",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the most efficient way to subtract one list from another? I am trying to subtract List_1 (50k lines) from List_2 (100k lines) , when an item in List_1 is an exact match for an item in List_2. I am using grep, specifically:
grep -v -f List_1.csv List_2.csv > Magic_List.csv
I know this is not the most efficie... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614761",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: tag not working properly I have a GWT app and Im trying to put fb social plugin comment in side of my page. However I have the folowing problem.
If I put the tag in my .html it works perfect, but If I put id dynamically (like with an HTML widjet), It does not work. It just does not display anything.
Can anyone he... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Adding new value to nested observable array created with knockout.mapping plugin and knockoutjs So close to getting this to work as expected. I am getting data from a JSON request and then using the mapping plugin to map it. I want to add new values to a nested array on a click binding.
Right now in my code I am get... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Entity Datagrid : best way to add computed values? I have a WPF datagrid databound to a collectionviewsource, which is itself based of a entity query
In my grid for example I have 3 columns Number1, Number2, Number3, all properties of an entity. If I want to add a column called SumNumber which is equal to Number1+Nu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614772",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: JQuery: How to show/hide a series of form labels onde after another I am trying to make a stream of show / hide fields in a form with jQuery.
This is the form:
<form>
<label for="onde" class="onde">
<b>qua qua text</b>
<textarea name="onde" id="onde"></textarea>
<a class="next">Continue</... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: what does this error messsage "Invalid token character ':' in token "Accept:text"" mean in spring mvc 3? Stacktrace is listed below. Really could not figure out what it means. Thanks for any help.
Caused by: java.lang.IllegalArgumentException: Invalid token character ':' in token "Accept:text"
at org.spring... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614778",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: JQuery Template - Calls ${$item.function()} more than is specified in the template Jquery-tmpl seems to call functions you attach to item multiple times.
JSfiddle: http://jsfiddle.net/abQwc/2/
The console.log's show rowCount got called 4 times for each item rendered by the template.
Template:
<h1 class="${$item.rowC... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using jQuery with node.js I have found out that you can use jQuery with node.js but all examples are for DOM and HTML manipulation.
Do you think using it for array iterations ( for each ) etc would be ok or a bit overkill?
A: NodeJS already has all the EcmaScript 5 Array Extras builtin. For example if you want all... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614781",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Developing/using a custom Resource Plugin in Zend Framework We have used Zend_Log, which is configured in application.ini differently for different circumstances. We initialize it/get it in the bootstrap and store it in the registry:
$r = $this->getPluginResource('log');
$logger = $r->getLog();
But we've sub... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614783",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Nesting with three levels of quotations I am trying to create a php variable that has three levels of nested quotes. How do I make a third level around "tackEvent", "downloads", "all", and "nofilter"? The double quotes that I have there are not working.
$outputList .= "<a href=files/".$content_file ." onClick='_ga... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Is it practical to use Mongo's capped collection a memory cache? Is it practical to use Mongo's capped collections as poor man's memcache assuming it will be kept in memory most of the time?
A: Yes. This is a perfectly acceptable use of a MongoDB capped collection. I am assuming you will have many more reads than... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to save var value outside ajax success function? I am trying to make some form validation functions. Here is what I have:
<script>
$(document).ready(function() {
var myObj = {};
$('#username').keyup(function () {
id = $(this).attr('id');
validateUsername(id);
});
function validateUsername(id... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Devise API authentication I am working on a rails web application that also provides JSON based API for mobile devices . mobile clients are expected to first obtain a token with (email/pass), then clients will make subsequential API calls with the token.
I am pretty new to Devise, and I am looking for a Devise API l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614798",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "45"
} |
Q: Sql Query needed im storing date in mysql database with timestamp in (int) type column.
but how can i get this ( CURRENT ) month current rows only?
What should be the sql query to fetch desired data?
A: Calculate the timestamp of the first and last secondof the month and use sqls BETWEEN
A: Add the year as well a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614805",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Mink selectors: any way to get the element in base of the content inside? for example, given the text of a link, retrieve the hole link element.
I tried this:
$page = $this->getSession()->getPage();
$page->find('content', 'Italiano');
But it says:
Selector "content" is not registered.
EDIT: after check the links... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614813",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: pyqt: long process in file open dialog I have little experience in GUI programming but I'm writing a GUI application with PyQt. With this application, user can open a binary file and do some editing with it.
When the file is opened, I do some processing that takes a while (~15s). So when the user pick the file and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614830",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: how to get profile images with facebook graph api I need to get all of the user profile images,
Mean I need more then the user profile image
I tried to get album, and to extract the images form it, but without success
A: You need
*
*Valid access_token
*user_photos permissions
After that, get photos
A: You co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614833",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Static Objects | Custom ConfigurationManager for Environment Independent Web.config I am working on a typical .net web app which is first deployed at test environment - ENV- T
and then after complete testing it is moved to Production ENV - P.
Our hosting provider will not deploy anything directly on Prod instead it... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614836",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: JMX MBean to manage dynamic set of properties The problem might sound similar to many resolved ones, but I did not shoot this target yet.
I am about to create a MBean that will allow me to specify dynamic set of key-value pairs.
(It is easy to create a solution to specify pre-defined set of params. But what about dy... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614837",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: When do you call the super method in viewWillAppear, viewDidDisappear, etc...? In UIViewController's documentation, Apple suggests calling the super at some point in the implementation of viewWillAppear, viewDidAppear, viewWillDisappear, viewDidDisappear, etc... For example, the discussion on viewDidDisappear is:
Y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614841",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: What is the "right" way to return a new class object from a VBA function? I am looking for the proper way to create and return a new class object in VBA.
I am familiar with the following pattern for returning a new Type variable (returned by value):
Public Type Foo
x as Integer
y as Integer
End Type
Public ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614842",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: iOS UITableView Cell loads incorrectly after scroll? I'm having 2 UITableView in a view and I added the UITableViewCellAccessoryDisclosureIndicator only at the 2nd table row 5 and row 7.
But after scrolling the 2nd table down (which row 1 disappears) and then scroll back to top (which row 1 appears), row 1 now has t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: bash read loop premature EOF In the following code I expect the while loop to execute three times, once for each matching line in the input build.cfg file. This is in fact what does happen, but only if I comment out the guts of the case blocks -- i.e. the subshells starting with ( mkdir work ... and ( cd product ..... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614847",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Facebook FB.ui oauth dialog error I'm having problems making a dialog box to ask for a user to log into my facebook tab to enter a contest.
We're trying to use the FB.ui oauth dialog box with the following code.
FB.ui({
client_id: '12345',
method: 'oauth',
scope: 'email,user_birthday',
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614848",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best practice for JS files being loaded? I'm faced with a dilemma. I started a project using Backbone.js and have many many JS files (views, models, controllers, templates, collections), but I didn't want to have to load them each using the script element in my HTML file.
My idea was to load one file (bootstrap.js) ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: String Comparison return value (Is is used in applications that sorts characters ?) When we use strcmp(str1, str2); or str1.compare(str2); the return values are like -1, 0 and 1, for str1 < str2, str1 == str2 or str1 > str2 respectively.
The question is, is it defined like this for a specific reason?
For instance, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Metro client consuming WCF wsdl, response object's properties not set I am attempting to consume a WCF web service from a Java client using JAX-WS and the Metro libraries. I have successfully generated the client using wsimport, and can open a session with the server, however the session token being returned by the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614856",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Telerik RadEditor HTTP POST VALUE not being updated (ASP.NET Web Forms) I am currently writing a ContentManager in ASP.NET. I have a preview button which uses jQuery to post the form data to new window and shows how a page would look without saving it to the database and effecting the live site. Although its been s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614857",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: PHP Countdown - How Do i use Else If for hours when there is less than 1 day left I need some php help
here is my code
<?php
// Define your target date here
$targetYear = get_theme_option('episode_countdown_year');
$targetMonth = get_theme_option('episode_countdown_month');
$targetDay = get_them... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: C++ Template Instantiation - Why must mine always be explicit, unlike STL? Any one of my C++ projects will generate a linker error unless I include an explicit template instantiation for every templated class/method/function I author and use.
STL classes seem to have no such problem.
Is there some simple code of con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614866",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Python object hierarchy, and REST resources? I am currently running into an "architectural" problem in my Python app (using Twisted) that uses a REST api, and I am looking for feedback.
Warning ! long post ahead!
Lets assume the following Object hiearchy:
class Device(object):
def __init__():
self._driver=Driv... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614869",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I set the GridView RowHeaderColumn to a TemplateField? I have a standard ASP.NET GridView and I'd like the first column (a emplateField) to be rendered as <th>, or in ASP.NET terms, I'd like to set it to the GridView RowHeaderColumn property. But that property is looking for the name of a DataItem (from a Bou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614870",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Script for adding an image at the very end of the last paragraph for multiple blocks For each article on a page, I would like to insert an image at the very end of the last paragraph. My HTML looks like this:
<div class="storycontent">
<p>One</p>
<p>Two</p>
<p>Three</p>
</div>
There may be several of tho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614874",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Regex - Replace the first comma and last comma from the csv list but leave the middle one I'm new to regex... but here goes.
So, Let's say I have this data.
13579,24680,13579,24680
13579,24680,13579,24680
13579,24680,13579,24680
13579,24680,13579,24680
So what I want is for it to replace the first comma, and the la... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614877",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to use Friendly_Id w/ STI? I'm pretty stumped about how to setup the friendly_id (4.0.0.beta12) gem to work properly with STI models.
Here is the model setup:
class Car < ActiveRecord::Base
extend FriendlyId
friendly_id :name, :use => :slugged
end
class Ford < Car
end
class Toyota < Car
end
If i try somet... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614880",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Wrap child elements into 2 divs equally I have a HTML code like this:
<li>one</li>
<li>two</li>
<li>era</li>
<li>jeu</li>
<li>iuu</li>
<li>iij</li>
<li>emu</li>
<li>our</li>
I need to wrap them into 2 element equally (or like 5:6 if total is 11), like this:
<ul>
<li>one</li>
<li>two</li>
<li>era</li>
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614883",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Trouble with click toggle animation I am having some issues with this jQuery nav I am building. When you click "Find zip", the zip code finder is supposed to fall down to 175px, then when clicked again, fly back up to 90px.
This set used work perfectly the first time, however it got stuck at 90px shortly there after... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614885",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: c# Thread Contention with SqlDataReaders and SqlDataAdapters We notice that inside of our .Net application we have contention when it comes to using SqlDataReader. While we understand that SqlDataReader is not ThreadSafe, it should scale. The following code is a simple example to show that we cannot scale our applic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614888",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What are the troubleshooting steps to troubleshoot if jquery events are not firing off? If a jquery event is not firing off, what are troubleshooting steps to figure out what causing why the event is not firing off?
A: The steps I take:
*
*Check the error console in your favorite javascript debugger and make sur... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614891",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Vertically centering text Link to my jsbin
I am having a bit of unexpected trouble. I would like to vertically center the "Thing2" text. However the css property vertical-algin: middle doesn't seem to be working.
So I'd like to know 2 things:
*
*Why isn't it working?
*Is the way I'm doing it (by adding a main cl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614907",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the best way to return agregate column with non agregate column in result set of a view I need to compare the final balances of two tables from different clients grouped by ID. The tables have the same ID's But one has multiple ID entries and the other does not. I need to sum row from the table with multiple... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614908",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Get back anonymous type
Possible Duplicate:
Accessing C# Anonymous Type Objects
Working with C# Anonymous Types
I'm using linq to entities to get id and full name from a table with customers.
public IQueryable RegresaClientesPorEmpresa(int id_emp)
{
var clientes = from c in context.clientes
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614912",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: is there any function in sql which may return the result from first two alphabet or the first alphabet? I am working on oracle10g. I was curious to know that is there any SQL function which may give results from the starting alphabet of a string.
For example, if I have road-1, road-A, road-89 and I want to know tot... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614914",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: When an object is locked, and this object is replaced, is the lock maintained? Let's say I have this java code:
synchronized(someObject)
{
someObject = new SomeObject();
someObject.doSomething();
}
Is the instance of SomeObject still locked by the time doSomething() is called on it?
A: The thread will stil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614917",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do I read from a pointer that looks like "process name" + address? As the title says I'm trying to read from an address I found in Cheat Engine's pointer scan. But the only problem is the only pointers I've ever had to work with are just Pointer Address + Offset. I am using C# .Net 4.0 from Visual Studio 2010. I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: using variable extracted from selector I am trying to use list elements to toggle between corresponding panels, I also want to do this using variables, just so I can orient myself with their use better. Here is my html and code below. I am tring to extract the i from the the "icon" id clicked, and use that i to open... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614923",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to iterate step with right shift in Python? Is it possible to use right shift as the step argument in xrange?
Basically I'm trying to do this (pseudo-code)
for i in xrange(35926661, 0, _value_>>6):
//logic
A: No.
xrange always works by adding the third parameter. You cannot tell it to do something like a r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Change height using CSS I have seen a question here about the same, but I can't get any of the answers to work (at least on Chrome).
This question is only for <br>, I know plenty of other techniques to change the height but in this case I can't change the HTML.
bla<BR><BR>bla<BR>bla<BR><BR>bla
CSS:
br {
display:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614928",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "99"
} |
Q: Can I improve the resolution of Thread.Sleep? Thread.Sleep() resolution varies from 1 to 15.6ms
Given this console app:
class Program
{
static void Main()
{
int outer = 100;
int inner = 100;
Stopwatch sw = new Stopwatch();
for (int j = 0; j < outer; j++)
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614936",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to set up multiple django versions on single apache service? I'm using Windows XP and want to know how can I create multiple django versions on a single apache service through virtual host(of course).
I'm trying to do that with one instance of python too. Should i create 1 instance of python for each django vers... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614940",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: LDAP Export: Need to change DN on export I'm trying to export the DN from Active Directory, but rather than have the CN equal to the displayName, need it to be the SAMAccountName. Can anyone help with this? I've tried adfind with the -replacedn switch and it changed the CN to SAMAccountName, but not the value. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614941",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Implementing a timer for an auto-logoff feature in an embedded system (Java) I'll try my best to explain the situation at hand. I'm developing an auto-logoff feature for an authentication application that runs in an embedded system and should work cooperatively with its own internal auto-logout system. First I'll br... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614944",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Few questions about SVN I work on a large scale project, now I did many changes + add new files in various directories, how can I find what I added (I know what I added, but lets assume I forgot...) so I can 'add' to the repository?
also, how can I commit all the changes at once?
thanks,
A: if you use the command l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614946",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Any way to create an arbitrary tone with Basic4android? Is there any way with Basic4Android to make it emit a sound of arbitrary frequency (meaning, I don't want to have pre-recorded sound files) and duration?
In some "traditional" Basic languages this would be done via e.g. a BEEP command followed by the desired fr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Interactive image plotting with matplotlib I am transitioning from Matlab to NumPy/matplotlib. A feature in matplotlib that seems to be lacking is interactive plotting. Zooming and panning is useful, but a frequent use case for me is this:
I plot a grayscale image using imshow() (both Matlab and matplotlib do well a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614949",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: antlr c# errors when integrating into VS2008 I am following the tutorial at: http://www.antlr.org/wiki/pages/viewpage.action?pageId=557075
When I get to step 11, compile with VS I am getting the following:
Error The type or namespace name 'AstParserRuleReturnScope' could not be found
Error The type or namespace ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614953",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Create set of all possible matches for a given regex I'm wondering how to find a set of all matches to a given regex with a finite number of matches.
For example:
All of these example you can assume they start with ^ and end with $
`hello?` -> (hell, hello)
`[1-9][0-9]{0,3}` -> (1,2,3 ..., 9998, 9999)
`My (cat|dog) ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614962",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Any default Entity Framework validation with ASP.NET MVC3? This question states that if Entity Framework and code first is used, some default validation is performed. I am using Entity Framework database-first and would like to use MVC 3 unobtrusive javascript validation. Is there some default validation that will... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614963",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Nested class in JavaScript I'm a totally newbie in JavaScript, which i need for a new project. And now I have a problem:
var main = new function() {
this.init = new function() {
//access something.init();
};
this.something = new function () {
this.init = function(){
//do something... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614967",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-2"
} |
Q: Can changes to a dll be made, while keeping compatibility with pre-compiled executables? We have a lot of executables that reference one of our dlls. We found a bug in one of our dlls and don't want to have to re-compile and redistribute all of our executables to fix it.
My understanding is that dlls will keep their... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614972",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: PHP Parse XML issues when XML has variables Pls see snippet of XML file below:
<products>
<product>
<id>2589527</id>
<name>Samsung PS42C450</name>
<manufacturer>Samsung</manufacturer>
<manufacturer-id>22</manufacturer-id>
<description>42 in, Widescreen, Plasma, HD Ready, Samsung DNIe+ ,</description>
<category>Sound... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: A potentially dangerous Request.Form value was detected from the client (wresult="I am also getting a request validation error when using WIF. I get correctly sent to the STS, but on the way back, I get this validation error.
I followed all the instructions.
<httpRuntime requestValidationMode="2.0" />
check!
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614978",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: How to solve a crossdomain policy security exception in C# I have been trying to create a C# IRC client, I've got everything working, and when connecting to some networks it throws a socket policy exception as follows:
System.Security.SecurityException: Unable to connect, as no valid
crossdomain policy was found ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614983",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: TraceSource.TraceEvent() fails logging when Exception message contains non-printable characters I have a call to TraceSource.TraceEvent() that is sometimes not writing to the Azure Diagnostics logs.
public class WorkerRole : RoleEntryPoint
{
private TraceSource trace = new TraceSource(
"ImportService", S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614985",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I share a local Subversion repository between a Mac workstation and a Windows virtual machine? I would like to share a Subversion repository between my main computer running OS X Lion and a virtual machine running Windows 7 hosted in this computer (via VMware). I am unsure what is the best way to go about th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614986",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: good references for comparing languages? I'm familiar with several computer languages (Java, C, C++, Python, Scheme, Javascript) but am only vaguely with the terminology for analyzing and comparing them (things like dynamic/static binding, dynamic/static types, pass-by-value vs. pass-by-reference, closures, operator... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614994",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Use linq to make a projection of an anonymous class with a list Suppose I have these classes:
public MyClass
{
public Property1 {get; set;}
public Property2 {get; set;}
public Property3 {get; set;}
public Property4 {get; set;}
public Property5 {get; set;}
public Property6 {get; set;}
public Prop... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614997",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: CALayer anchorPoint doesn't work as expected with CGAffineTransform I have a CALayer, containing few sublayers (CATextLayers).
I'm applying transformations on the CALayer on some usual gestures (zoom, pan).
Everything works perfectly fine except that the scaling (zoom) is done towards the bottom left corner instead ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7614999",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Simple way to check if input is in focus and to disable mouseleave function if true I have to admit that I'm definitely no jQuery genius but what seems like asimple solution has just totally eluded me.
Basically I have a drop down script working on a nested ul to display on rollover of its parent. In one of the nes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615006",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Disable Interpolation when Scaling a NOTE: This has to do with how existing canvas elements are rendered when scaled up, not to do with how lines or graphics are rendered onto a canvas surface. In other words, this has everything to do with interpolation of scaled elements, and nothing to do with antialiasing of gr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615009",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "147"
} |
Q: Encoding issues crawling non-english websites I'm trying to get the contents of a webpage as a string, and I found this question addressing how to write a basic web crawler, which claims to (and seems to) handle the encoding issue, however the code provided there, which works for US/English websites, fails to proper... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615014",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Using .htaccess to redirect a domain to another URL I have a site running wordpress, it's the full site. One of the pages is like a contact-us form located at www.ourdomain.com/contact-us/
I also have a URL like contactourdomain.com and I want it to redirect to www.ourdomain.com/contact-us/
We used to do this with ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615019",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Google plus one button is not visible while loading it on partial postback asp.net While implementing google plus one button through addthis on one our localized pages where the following data was retrieved from a backend (assume database), facing a wierd problem, the plus button is not getting loaded. we ajax based... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615021",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I plot the densities from a histogram? So I want to do something like this in R:
x <- rnorm(1000, 100, 50)
h <- hist(x, breaks="fd")
z <- plot(h$breaks, h$density)
The problem is that the $breaks field in the histogram has one more value than the $density field? is there an easy way around this problem?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615025",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Boosting Solr Range Query Is there a way to boost based on a range query in solr.
I've tried adding the boost to the end of the range, but it doesn't seem to apply the boost to the score. I've run the query without the "(: ||" to ensure that I'm getting results that are both inside and outside the range. The sco... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Website youtube embedded video keeps playing I'm using the iframe youtube gave me to embed a video on my website.
I also am using a css popup which i learned from this page
http://www.pat-burt.com/web-development/how-to-do-a-css-popup-without-opening-a-new-window/
So my html code looks like this
<div id="blanket" st... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615031",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Uncaught TypeError: Object [object DOMWindow] has no method 'set' on backbone-min.js I am receiving this error message when including backbone in my application,
Uncaught TypeError: Object [object DOMWindow] has no method 'set'
but I have jquery (1.4.4) and underscore.js (1.1.7) loaded before backbone, why is this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615034",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: which method is used to register the device token for push notification? I am able to get the deviceToken in the below method, now I want to know how to register the deviceToken for push notification,because I am not sure after getting the device token which method or API is used to register the device token for Pus... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615036",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Difference between ClassLoader.getSystemResourceAsStream and getClass().getResourceAsStream() Given this code:
/* 1 */ InputStream in1 = ClassLoader.getSystemResourceAsStream("foobar.txt");
/* 2 */ InputStream in2 = this.getClass().getResourceAsStream("/foobar.txt");
Do both return the same resource (I think the an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615040",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: CSS selector to hide first of a set To start, I have no control over the html. I am looking for a CSS solution. CSS2/3 are fine. I have no idea why I can't figure this out, but hey it's Friday. I guess my brain is scrambled.
http://jsfiddle.net/mrtsherman/PDBmU/13/
I need to hide the span.smalltext containing (Docum... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615041",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How can I do basic html validation within a column in a SQL Server database? I have a database table with HTML snippets (not whole documents) in a column and I need to do some basic HTML validation of the contents. My initial need is to just be able to run a one time query+validation report, not anything more compli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615045",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Validation on a single DataGridView column How can I perform validation on a particular DataGridViewTextBoxColumn column in my DataGridView, so that a user is required to enter a value into it?
A: i think you are looking for datagrid view text box column validation right ? if so would you pls take a look at this li... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615050",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Like button with layout=button_count blows out the default 90px I am using an iframe version of the FBL Like button with the button_count layout. I also have set show_faces=false. This layout used to show ( and the code generator still shows ) just the like button and a count box with the number of likes.
Now it see... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615051",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Additional argument to process during start of app from CLI c# I have made a HTML parser thanks to the help of this website but I am running into a new obstacle. I have a webserver that hosts configuration files that I want parsed. Instead of loading my app and inserting the link I want to just pass on a argument to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615053",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Intermittent "UDT not defined" error when compiling VBA but code runs without errors I'm building an Access database and I'm getting a "User-defined type not defined" error when I compile the project using Debug > Compile, but the database opens and runs without any runtime errors, and everything seems to work. No l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615054",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Load all AJAX content, including images, before rendering I'm working on a project that needs to automatically load content and insert it at the beginning of a page without disturbing the page's vertical scroll position. Inserting the content, calculating its height, and then adding that to the page's scroll positio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615056",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Why isn't my objective-C child class inheriting the property of it's parent? In the .h and .m files of my parent class (WebServiceMessage) I have the following lines:
@property(nonatomic, retain) NSMutableData *receivedData;
@synthesize receivedData;
My child class has the following definition:
@interface Registrat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/7615060",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.