How to create a Linq To Entities expression

:HI, I'm using Linq To Entities and I'd like to convert thisreturn db.Products .Where(p => p.idUser.Equals(id) && p.Category.Genre.Any(g => g.visible))into something likeFunc expr = g => g.visiblereturn db.Produ

Is there a form of bitvector concat in the z3 c++ interface?

:The Concat() function in the z3 python interface allows you to concatenate arbitrary bit vectors. Our application is using the C++ interface, though. Is there an easy way to get the same effect with the C++ interface? I'm trying to build up an output

Get a generic's member names as strings without knowing the type parameters

:I'm using reflection to get some member names as strings. I'm using a method I found on Google Code (but I don't have a strong grasp of the reflection/LINQ magic it uses):public static class MembersOf { public static string GetName(Expression

High cpu consumption due to a jquery regex patch

:I am going to work on a project developped by someone else. I don't have any contact with this guy.I noticed a very high cpu consumption by the browser when the page is loaded.After some investigations, i think that the problem comes from a patch of jqu

Filter a table by input value, on key up (simplify my code) [closed]

:I have a solution already, but it's messy and could use some tweaking. Basically, I have two tables on a page and each table has an input text box for every column with a corresponding filter name. The idea is that while the user is typing above that c

Can I make XQuery evaluate { $expression } within variables bound with XQJ?

:To mimic an auto-increment value in XQuery Update, the following works fine, assuming when running this for the first time:let $count := /root/@countreturn ( insert node into /root, replace value of node $c

How to run a perl script from another passing parameters?

:How to run a perl script from another passing parameters? I'm trying to use a solution found in a internet post that i can't find anymore.It was something like: do 'script.cgi param1 param2';And in the other script I'm using simply the shift to ge

How to select the min value with leftJoin in Doctrine using query builder

:Trying to do a leftJoin, getting the lowes price value in the second with a groupBy on the first table: ->select('a', 'ap') ->from('AppBundle:Accomodation', 'a') ->leftJoin('a.rooms', 'ap') ->groupBy ('')

How to get the model value in SAT problems using c++ api?

:I am using c++ api of z3 to solve a sat problem.When the problem is sat, I want to get the satisfiable assignments of all the variables.I find it easy to print the value of a variable as the following code shows:context c;solver s(c);expr x=c.bool_const(

How to use Java's regex to split nested mathematical equations

:I was curious on how it would be possible to split mathematical equations with parenthesis meaningfully using java's string regex. It's hard to explain without an example, one is below.A generic solution pattern would be appreciated, rather than one wh

getting new unsat cores

:thereI am trying to extract clause from formulas and change one clause's polarity every time, if is solved sat, computing models and put the clause in the set. If it is solved unsat, then find out new unsat cores. But incrementally calling unsat core fu

Using `lmap` to filter list of strings

:Suppose I want to get all the 5-letter words from a list.set words {apple banana grape pear peach}lmap word $words {if {[string length $word] == 5} {expr {"$word"}} else continue}# ==> apple grape peachI'm not happy with the quoting mess of expr {"$w

Odoo change base javascript method

:There is a file in Odoo: addons/mail/static/src/js/chatter.js . It contains a method I would like to change: message_get_suggested_recipients.For this I created an addon with files:chatter.xml?xml version="1.0" encoding="utf-8"?>

Macro which prints an expression and evaluates it (with __STRING)

:For learning and demonstrating, I need a macro which prints its parameter and evaluates it. I suspect it is a very common case, may be even a FAQ but I cannot find actual references.My current code is:#define PRINT(expr) (fprintf(stdout, "%s -> %d\n",

Which part of the C++ standard covers calling a method via a null pointer?

:There are many questions on Stack Overflow that explain that the following is undefined behavior in C++:MyType* p = nullptr;p->DoSomething();but I can't find one that cites the C++ standard. Which part of the C++11 and/or C++14 standards say that this i

bison only reads one line [closed]

:I'm doing a simple calculator with flex and bison but it only reads the first line of the input file.this is my bison code:%{ #include #include #include #include "symtab.h" extern int yylex(void); extern

Python regex - Replace single quotes and brackets

:I'd like to replace quantities with name then a square bracket and a single quote with the contents inside. So, from this: RSQ(name['BAKD DK'], name['A DKJ'])to this:RSQ(BAKD DK, A DKJ) 1:Code -import res = "RSQ(name['BAKD DK'], name['A DKJ'

unix shell scripting subtraction for floating point numbers

:#!/bin/ksha=8.3b=10.20diff=`expr $b - $a`echo "$diff"its giving expr: 0402-046 A specified operator requires numeric parameters. error i want output as 1.9 1:You don't need bc for this, use the native arithmetic operators in ksh#!/bin/ksha=8.3b=1

Uncaught TypeError: Cannot read property 'showBarChart' of undefined in React

:I have a function that customizes tooltip of nvd3 scatterChart plot. In the function I want to update state, so I am calling another function that does setState:chart.tooltip.contentGenerator(function (d) { var html = ""; d.series.forEac

C# RegEx for nested function

:I am having trouble to evaluate the following expression using RegEx in C#.add(1, 2, sub(4, add(1, 2)), div(4, 2))which will be evaluated as below.=> add(1, 2, sub(4, 3), 2)=> add(1, 2, 1, 2)=> 6Functions are picked up from regex expression and parameter

How to create a flag with getopts to run a command

:I need help with my getopts, i want to be able to run this command ( mount command) only if i pass a flag ( -d in this case).below output is what i have on my script but it doesn't seem to work. CHECKMOUNT=" "while getopts ":d" optdo case "$opt"

Can't compile flex & bison (Symbols not found x86_64)

:I am trying to compile a simple program on Flex & Bison on my Mac running Yosemite but get the following error:Undefined symbols for architecture x86_64: "_yyerror", referenced from: _yyparse in pr1-19c182.old: symbol(s) not found for architectur

shiny + ggvis: reactive using ggvis “tilde” or “~”

:All I want is an efficient way to set the ggvis fill property in server.R according to the InputSelect box in ui.R. Since the fill property syntax needs a "tilde" or "~" I was unable to come with a solution. The ui.R and server.R below are just one o

Disable encryption with :X in vim

:I find myself hitting :X when I mean to type :xIs there a way to disable :X as encryption so that typing :X in vim has no effect?I assume there is a command that can be placed in the .vimrc file? 1:There is a somewhat standard way of using cnoreabbrev

Writing a macro that contains a match body

:I'm attempting to condense some repetitive code that has structure similar to:match { None =>, Some(MyStruct { foo: x, .. }) => match x { Pattern1 => result, Pattern2 => { block_result } }}w

 93    1 2 3 4 Next Last