info

MYSQL Group by column with 2 rows for each group

匿名 (未验证) 提交于 2019-12-03 08:44:33
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I need 2 id for each group. SELECT `id` , `category` . `cat_name` FROM `info` LEFT JOIN `category` ON `info` . `cat_id` = `category` . `cat_id` WHERE `category` . `cat_name` IS NOT NULL GROUP BY `category` . `cat_name` ORDER BY `category` . `cat_name` ASC How to do this? Sample Data: id cat_name 1 Cat - 1 2 Cat - 1 3 Cat - 2 4 Cat - 1 5 Cat - 2 6 Cat - 1 7 Cat - 2 Output Will be: id cat_name 6 Cat - 1 4 Cat - 1 7 Cat - 2 5 Cat - 2 回答1: If you need two arbitrary ids, then use min() and max() : SELECT c . `cat_name` , min ( id ), max

sbt 0.12.4 - there were x feature warning(s); re-run with -feature for details

匿名 (未验证) 提交于 2019-12-03 08:42:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get an error there were 15 feature warning(s); re-run with -feature for details : $ /usr/local/sbt/bin/sbt [info] Loading project definition from /home/alex/Documents/projects/my_app123/project [info] Set current project to sbt-android (in build file:/home/alex/Documents/projects/my_app123/) > compile -feature [error] Expected end of input. [error] compile -feature [error] ^ > sbt-version [info] 0.12.4 > compile [warn] Credentials file /home/alex/.ivy2/.credentials does not exist [info] Compiling 20 Scala sources to /home/alex/Documents

String.FormatException with DateTime in non US Culture

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am getting a String.FormatException trying to convert/parse a string when the culture is other than non-US. The odd thing is that the string was generated by applying the very same format and culture as those being used to parse it back into a string. In the code below, all of these versions will fail: const string culture = "ja-JP" ; const string format = "dd MMM yyyy" ; //error in orignal post included {0:} CultureInfo info = new CultureInfo ( culture ); Thread . CurrentThread . CurrentCulture = info ; Thread . CurrentThread .

Spark driver disassociated and removed by the master

匿名 (未验证) 提交于 2019-12-03 08:41:19
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a cluster made by two slaves and one master and set up and I submit a jar (scala) to the spark master (192.168.1.64): spark-submit --master spark://spark-master:7077 --class tests.elements target/scala-2.10/zzz-project_2.10-1.0.jar After quite sometime running just fine it stops abruptly with the last lines on the terminal being ... 15/08/19 17:45:24 INFO scheduler.TaskSchedulerImpl: Adding task set 411292.0 with 6 tasks 15/08/19 17:45:24 WARN scheduler.TaskSetManager: Stage 411292 contains a task of very large size (2762 KB). The

How do I extract info deep inside XML using C# and LINQ?

匿名 (未验证) 提交于 2019-12-03 08:39:56
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This is my first post on StackOverflow, so please bear with me. And I apologize upfront if my code example is a bit long. Using C# and LINQ, I'm trying to identify a series of third level id elements (000049 in this case) in a much larger XML file. Each third level id is unique, and the ones I want are based on a series of descendant info for each. More specifically, if type == A and location type(old) == vault and location type(new) == out , then I want to select that id . Below is the XML and C# code that I'm using. In general my code

Mongodb find inside sub array

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a document that's setup like this: { _id : ObjectId(), info : [ [ 1399583281000, 20.13 ], [ 1399583282000, 20.13 ], [ 1399583283000, 20.13 ], [ 1399583285000, 20.13 ], [ 1399583286000, 20.13 ] ] } This data could be spread across multiple documents. In general, each document contains data in the info for 59 periods (seconds). What I would like to do is get all of the info data where the timestamp is greater than a specific time. Any ideas how I would go about doing this? Thank you EDIT: So, I've found that this seems to return all of

npm install does not work when running npm install cordova

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Ionic framework to build hybrid apps. According to the official website, i need to get the version 4.2.4 of Node.js, which includes npm package manager. One of the dependencies needed by Ionic is cordova so that i run the following command to get it C:\Users\ferrero>npm install -g cordova After then, the console logs npm info it worked if it ends with ok npm verb cli [ 'C:\\Program Files\\nodejs\\node.exe', npm verb cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', npm verb cli 'prefix', npm verb cli '-g' ] npm

JBoss 7.0.1 running without jsessionid in the URL is not working

匿名 (未验证) 提交于 2019-12-03 08:36:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Because of some security reasons I deceided to disable session tracking by jsessionid in URL. Before I changed my web.xml to the one below, I had on the first time I visited the page a jsessionid in the url, after clicking the first link, it never appeared again. My web.xml looks like <session-config> <session-timeout>10</session-timeout> <cookie-config> <secure>true</secure> </cookie-config> <tracking-mode>COOKIE</tracking-mode> </session-config> Now I have the jsessionid in the URL, if I click another link on the page it never disappears.

How to solve Gradle sync failed error (DefaultMavenFactory)?

匿名 (未验证) 提交于 2019-12-03 08:35:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to build project, but I get an error: Gradle sync failed: Cause: org/gradle/api/publication/maven/internal/DefaultMavenFactory Consult IDE log for more details (Help | Show Log) I am using com.github.dcendents:android-maven-plugin:1.2 and Gradle 2.2.1 in project settings. Here is full log. How to resolve it? 2015-10-07 12:10:57,789 [1857544] INFO - ls.idea.gradle.GradleSyncState - Started sync with Gradle for project 'myproject'. 2015-10-07 12:10:57,808 [1857563] INFO - s.plugins.gradle.GradleManager - Instructing gradle to use

Parse log files programmatically in .NET

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have a large number (read: 50,000) of relatively small (read under 500K, typically under 50K) log files created using log4net from our client application. A typical log looks like: Start Painless log Framework:8.1.7.0 Application:8.1.7.0 2010-05-05 19:26:07,678 [Login ] INFO Application.App.OnShowLoginMessage(194) - Validating Credentials... 2010-05-05 19:26:08,686 [1 ] INFO Application.App.OnShowLoginMessage(194) - Checking for Application Updates... 2010-05-05 19:26:08,830 [1 ] INFO Framework.Globals.InstanceStartup(132) - Application