select first three values order by a column
Vote count: 0 i have 2 tables : med CREATE TABLE med (id_med INT AUTO_INCREMENT PRIMARY KEY, name_m VARCHAR(50), su ame_m VARCHAR(50), spec VARCHAR(50), UNIQUE (su ame_m,name_m)); viz CREATE TABLE viz (id_m INT NOT NULL, id_p INT NOT NULL, id_c INT NOT NULL, dt DATETIME) i need to select the first 3...
Select the first JSON array child value
Vote count: 0 I want to get the value that holds the first child of a JSON array. This is the array : var sms = { '1' : { 'address' : '+123', 'body' : 'SMS1' }, '2' : { 'address' : '+123', 'body' : 'SMS2' }, '3' : { 'address' : '+123', 'body' : 'SMS3' }, '4' : { 'address' : '+123', 'body' : 'SMS4' }...
Is it possible to build this query in SQL or With PL/SQL?
Vote count: 0 I have This Tables: 1- Users Table ╔════════╦═════════╗ ║ UserID ║ Name ║ ╠════════╬═════════╣ ║ 12345 ║ Scott ║ ╠════════╬═════════╣ ║ 54321 ║ Jeffry ║ ╠════════╬═════════╣ ║ 98765 ║ Larry ║ ╚════════╩═════════╝ 2- ScoreTypes Table ╔══════════════════╦════════════╗ ║ ScoreTypeID (PK) ...
search through an array of hashes
Vote count: 0 @users = [ {id:"0", name:"Thomas One", email:"thomas@fake.nl", password:"adkdjaso"}, {id:"1", name:"James Five", email:"j4@fake.nl", password:"jdajdlae"}, {id:"3", name:"Gordon Four", email:"g4@fake.nl", password:"adsldsae"} ] def getId puts "what is your email address?" @account = get...
Adding counts based on flags by dates
Vote count: 0 Could you please advise some direction on how to achieve the below format? I am at lost thinking solution for this problem.. date: 6/20/2016 1 0 5 6/20/2016 2 0 6 6/20/2016 3 1 4 6/20/2016 4 1 2 6/20/2016 5 0 4 6/20/2016 6 0 6 6/21/2016 1 0 4 6/21/2016 2 0 3 6/21/2016 3 1 7 6/21/2016 4...
SQL Partition Dates
Vote count: 0 I have data such as this: ID|From Date |To Date 1 |01/01/2014 |04/01/2015 1 |04/01/2015 |01/01/2016 1 |01/01/2016 |12/31/2016 But I would like this as the end result: ID|From Date |To Date 1 |01/01/2014 |12/31/2016 I tried partitioning, but I'm not quite familiar with how it works. Any...
Image Capture Intent makes image file different permission
Vote count: 0 I'm trying to give the user the option to either supply a photo they've taken in the past, or take a new photo right now. The issue is that when I try to use the image, I get a "permission denied." This is where I make the chooser intent: final File root = new File(Environment.getExte ...
CreatePolygonRgn and const POINT *
Vote count: -1 I give you only the lines conce ing my problem. I don't know why this does not compile : POINT ptVertex[5]; ptVertex[0].x = 180; ptVertex[0].y = 80; ptVertex[1].x = 100; ptVertex[1].y = 160; ptVertex[2].x = 120; ptVertex[2].y = 260; ptVertex[3].x = 240; ptVertex[3].y = 260; ptVertex[4...
Is this type punning well-defined?
Vote count: 1 Reading quote in this answer about strict aliasing rule, I see the following for C++11: If a program attempts to access the stored value of an object through a glvalue of other than one of the following types the behavior is undefined: ... an aggregate or union type that includes one o...
JSONObjectWithData failing in Swift
Vote count: 0 I am using REST api's (from HERE maps) for various services. I am trying to parse JSON results. One works and the other doesn't. The first one is a direction service that will spit out a direction between 2 locations. This is the JSON output: {"results":[{"waypoints":[{"id":"1 Infinite...
(SQL) Creating an uncorrelated query
Vote count: 0 I had to write an SQL-Query for a given Database (it's huge, I won't be able to post it here, but its about artists with albums and release dates, genres etc.). The Task was to find all artists involved in albums which contains the word "drop". I had to write an correlated and an uncor...
MySQL - SELECT words composed only by specified letters
Vote count: 0 I'm trying to write a MySQL query to select words composed only by specified letters. For example given the sequence 'by' would be selected words like 'b', 'y', 'byb', 'bbyy', 'byyybb', 'yy' and so on. So only words composed by 1 or more occurrence of 1 or more of those letters, kind o...
Windows background service to kill processes by name on demand
Vote count: 0 I want to write a simple background service that can kill all instances of a certain process for all users on demand. The process will always be the same (Microsoft Access). The idea is that users without administrative rights are able to execute a script, which tells the background se...
pass variable to controller via ajax MVC 5
Vote count: 0 I load a partial view through ajax action link. @Ajax.ActionLink(" ", "adduser", "users", new { use ame = item.UserName }, new AjaxOptions() { UpdateTargetId = "add_research" }, new { @class = "glyphicon glyphicon-link" }) I pass it to controller like public ActionResult AddUser(string...