id
stringlengths
5
11
text
stringlengths
0
146k
title
stringclasses
1 value
doc_14000
function getNormalizedLocationPath($path) { $path = is_scalar($path) ? strtolower(trim($path)) : ''; $path = preg_replace('/[^a-z0-9.]/', '', $path); return $path; } $path=getNormalizedLocationPath($_GET['path']); $sql= "INSERT INTO paths VALUES (${path})"; $pdo = new PDO(); $pdo->query($sql); As you can see ...
doc_14001
Now I want to use instanceof while I go over an array of Employee Example: while (employee[i]!=null){ if (employee[i] instanceof Manager) here is my problem"!! I want to sysout a Manager atribute "Name": sysout("Name: "+employee[i].name) but it says create name in Employee.. why if it extends employe...
doc_14002
<ItemsControl ItemsSource="{Binding EBBusBreakers}" > <ItemsControl.ItemTemplate> <DataTemplate> <Border Background="BlanchedAlmond" CornerRadius="5" Margin="0.5" BorderBrush="Black" BorderThickness="1" Padding="1"> <Border.Resources> ...
doc_14003
build.sbt: scalaVersion := "2.11.0" val sparkVersion = "2.0.1" libraryDependencies ++= Seq( "org.apache.spark" %% "spark-core" % sparkVersion % "compile", "org.apache.spark" %% "spark-sql" % sparkVersion % "compile", "org.scalatest" %% "scalatest" % "2.2.6" % "test", "org.apache.spark" %% "spark-core" ...
doc_14004
My curiosity is grown larger and what ORM really are, so i decided to start building one from scratch but did some research yesterday and today and im still very confused on where to start from and I don't seem to be able to find a good guide to start from. Lately my love for MongoDB has been growing so it would be eve...
doc_14005
myarray['type1']['label1'].push('Data to insert'); myarray['type1']['label1'].push('Data2 to insert'); myarray['type1']['label1'].push('Data3 to insert'); myarray['type2']['label1'].push('Data to insert'); myarray['type2']['label2'].push('Data1 to insert'); myarray['type2']['label2'].push('Data2 to insert'); Here is...
doc_14006
AngularJS: $http.post("/api/favorite", { params: { "param1": containerId }}) PHP(Slim Framwork): $app->post('/api/favorite', function (Request $request, Response $response) { echo "testPostmanPat"; }); Both are POST and even the header: Server Log: INFO 2017-11-28 14:13:11,365 mod...
doc_14007
class A { typealias Factory = PotatoFactoryProtocol & CarrotFactoryProtocol let factory: Factory init(factory: Factory) { self.factory = factory } } Is it possible to pass both a PotatoFactory() and a CarrotFactory() into A due to typealias Factory accepting both? If not, how would be the bes...
doc_14008
A: A threaded binary tree is not a DAG, since it has cycles, but it is easy to treat it as one in any algorithm by not following threads (think treating them as NULL pointers). It is also easy to convert any Threaded Binary Tree into a Binary Tree by removing all the threads.
doc_14009
I found out that I can do that with the Large Objects. In the API are two different objects discribed, the Static Large Objects (SLO) and the Dynamic Large Objects (DLO). For both I need to upload all of the parts and then a manifest, which holds the references to these parts. Now my question is: what is the difference...
doc_14010
So, I write a very simple test and when I run it, fails always. My test code is: import javax.crypto.Cipher; import org.junit.Test; import org.mockito.Mockito; public class SimpleTest { @Test public void simpleTest() throws Exception { Cipher cipher = Mockito.mock(Cipher.class); cipher.doFinal...
doc_14011
The fragment inflates and handles all interaction but the networking layer dependency is somehow missing because I receive: NotFoundException: No binding found for bind<String>() with ?<Fragment>() every time I hit the button that validates the username/password on this LoginFragmnet. I don’t understand this error beca...
doc_14012
My search code <?php require_once 'twitteroauth.php'; define('CONSUMER_KEY', 'aaaaaaaaa'); define('CONSUMER_SECRET', 'bbbbbbbbb'); define('ACCESS_TOKEN', 'cccccccccc'); define('ACCESS_TOKEN_SECRET', 'ddddddddddddd'); function search(array $query) { $toa = new TwitterOAuth(CONSUMER...
doc_14013
def create4(n): output = [] for i in range(n): output.append(range(1+i,1)) return output I want it to produce: [[1,2,3,4,5], [2,3,4,5],[3,4,5],[4,5],[5]] for when I print create4(5). How would I change my for loop make the code produce the desired output? A: Add a second for loop. The first for will iterate over...
doc_14014
I tried the following, but it causes an infinite loop, for some reason the row and column won't update to the next search result. private void RenameSubCategory(ExcelWorksheet sheet, string subCategoryOld, string subCategoryNew) { int row, column; while (sheet.Cells.FindText(subCategoryOld, false, false, ...
doc_14015
<div data-1223="some data" data-209329="some data" data-dog="some value"> Is there a way to get all the data- attributes of the element? For a specific attribute I can use elem.getAttribute('data-1223') but how can I get all the data attributes together A: No. There is no way in Selenium WebDriver to access any at...
doc_14016
doc_14017
However during run time, my receiver is receiving the sms first then the systems message service is invoked first. Is this the behavior of custom broadcast receivers? Thx! Rahul. A: Android sends ordered broadcasts for SMS messages. From the reference guide (emphasis mine) Ordered broadcasts (sent with Context.send...
doc_14018
I'm not sure why, but it's not working. the program should put into an integer the location of it. Not a pointer but if the most common is str1[i] then it will put into an integer the value of i. And so in the second most common. If it is str1[j] than it should put into an integer the value of j. then, it's supposed to...
doc_14019
ERROR in ./node_modules/cookie-signature/index.js 4:13-30 Module not found: Error: Can't resolve 'crypto' in '/home/juandav/react-app-store/my-store/node_modules/cookie-signature' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need ...
doc_14020
"TypeError: string indices must be integers" and I have no idea why. The JSON I am trying to read in is as follows: { "rightArgument":{ "cell":"C18", "value":9.5, "type":"cell" }, "leftArgument":{ "rightArgument":{ "cell":"C3", "value":135, "type":"cell" }, "leftArgument":{ "rightArgument":{ "cell":"C4", "value":125...
doc_14021
* *New Password *New Password (confirmation) I had to create a validation where "New Password (confirmation) needed to match "New Password" and I made it. When you type in a wrong password in "New Password (confirmation) field, it gives an error and wont let you submit the form until it matches the password in fiel...
doc_14022
I need to do an authenticated download using javascript and fetch api. However, there is an automatic call to the backend of type document (which is request to fetch metadata), which does not get the necessary access token from the custom header (XCompanyAccessToken) to actually create the file to be downloaded. The c...
doc_14023
I have a HTML form: <form name="algoDico" action="" onsubmit="return buttonClicked()"> Mot: <input type="text" name="mot" id="mot"> <input type="submit" value="Submit"> </form> and my Javascript: var buttonClicked = function () { var w = $('#mot').val(); $.ajax({ type: "GET", url: "http://www.igre...
doc_14024
My WCF class library also references another project within the Visual Studio solution, and many classes are in the referenced project that are used by the service and calling applications. Today, after publishing some changes to the service (I did not make ANY changes to the referenced project or its classes), three o...
doc_14025
class Product { public string name; public int iD; public int price; public void addProduct() { Console.WriteLine("Enter Name : "); name = Console.ReadLine(); Console.WriteLine("Enter ID : "); iD = int.Parse(Console.ReadLine()); ...
doc_14026
For the moment we don't know where store this report data, which tool to use ? We are using aws cloud, and are looking over internet to know if aws provide such bug tracker tool. If not what tool could we use to achieve this use case ? Thanks in advance. A: Finally i find a list of tools used to track user bugs and re...
doc_14027
In my web server, I use mongodb c++ driver to query data from mongodb. When the result docs is over 330,000, mongodb driver reports field not found exception: 2015-01-22T16:57:59.848+0800 Assertion: 13111:field not found, expected type 7 But if we decrease the returned number, it works correctly. Below is my code: sha...
doc_14028
I have designed a project with a normalized database schema. I am using code first. I have a table called JOBS. I have another table called status. I intend to give a job a status. The status has to be user set so its in a table which you can add to. A job can be, say, "booked", "parts to be ordered", "invoiced". etc ...
doc_14029
below is my object [ "conversation_id": "5a88779b2321141f2864e484" "messages": [ { "message_id": "5a88779b2321141f2864e483", "sender_uid": 2, "receiver_uid": 1, "created": "2018-02-17T18:42:35.252Z", "status": 1, ...
doc_14030
I've managed to do this on POSIX using the value of the semaphore. Is there any way to do this in Windows ? A: Don't use a simple integer with a busy loop. Use an actual semaphore object via CreateSemaphore(), and use WaitForSingleObject() (or related function) to tell you when the semaphore is in a state to pass thr...
doc_14031
* *the functions provided by java.lang.ClassLoader to load classes, and *java.lang.String.intern.. (Reference) What other functions/classes uses memory from the PermGen space instead of the heap space?
doc_14032
String code = "abcdefghijklmnopqrstuvwxyzabcd"; //my lag is 4 and I added the first 4 characters to char old; //avoid OutOfRange issues char nou; for (int i = 0; i < code.length() - lag; ++i) { old = code.charAt(i); //System.out.print(old + " "); nou = code.charAt(i ...
doc_14033
http://codepad.viper-7.com/2tiPvN $j=0; $paper = array('copier' => "Copier and Multipurpose", 'inkjet' => "Injet Printer", 'laser' => "Laser Printer", 'photo' => "Photo Paper"); foreach ($paper as $index => $description) { echo "$j, $index: $description"; $j++; } I wa...
doc_14034
serviceHub.getAppContext().config After getAppContext() i can't find anything about config file. A: This feature is not available in Corda 3. As of this answer, it is only part of the unstable master branch. It will be included in a future release of Corda. However, you can implement this manually for now as follows:...
doc_14035
use Mail::Outlook; my $outlook = new Mail::Outlook(); my $outlook = new Mail::Outlook('Sent Items'); my $folder = $outlook->folder(); my $folder = $outlook->folder('Sent Items'); $message = $folder->first(); $text = $message->Subject(); $test=$message->{message}->SaveAs("C:\\mail\\$text.msg"); print $text; The above...
doc_14036
code snippets: var fs = require('fs') function writeDataTofile(data){ fs.writeFile("../transactionData.json",data,"utf8",function(err){ if (err) return }) console.log("file written") } the data comes from here: function getApiData(tx){ console.log("api initiated") //run chrome extension below to a...
doc_14037
I am facing an issue on the running pod of strapi "Error: Parse Error: Invalid method encountered" which unable to understand. anyone faced such kind of issue. Please guide how can enable errors on strapi.
doc_14038
The problem I am having is I want the scrolling to stop 100px above the anchor. What would I need to change in this code to achieve this result? $(document).ready(function() { $('a[href^="#"]').click(function() { var target = $(this.hash); if (target.length == 0) target = $('a[name="' + this.hash.substr(1...
doc_14039
I am interested in learning how to schedule jobs in R - for instance, suppose I want to run the script below every Monday at 12:00 AM: ## my_script (create some random numbers, put them in a data frame, ## and save this data frame as a "csv" file containing the date/time ## at which the file was created): a = rnorm(1...
doc_14040
For example with lodash you can do something like this: import has from 'lodash/has'; Example would be: import moment from 'moment'; moment.months() I know the latest webpack can handle it automatically, but question is for old webpack (1.0) A: It's impossible for moment.. You can do some plugin: https://github.com/m...
doc_14041
Neuron b = new Neuron(); Fft f = new Fft(); float e = 2.71828f; float eta = 0.05f; float alpha = 0.05f; float[] saw = new float[42]; float[] dh = new float[42]; float error = 0; float dto = 0; Random broj = new Random(); TextReader br = new StreamReader("d:/trening.txt"); ...
doc_14042
XDocument xDoc = new XDocument( new XDeclaration("1.0", "UTF-16", null), new XElement(empNM + "Employees", new XElement("Employee", new XElement("EmpId", "5"), new XElement("Name", "Kimmy"), new XElement("Sex", "Fe...
doc_14043
a = [1 2 1 4; 3 4 9 16; 0 0 -2 -4; 0 0 -6 -8] How can I arbitrary remove any given rows or columns? for example second row and third column of the above matrix? A: Just assign the column or line to the empty matrix: a(2,:) = []; a(:,3) = []; Note : I compare the other solution to mine, fol...
doc_14044
If the optional raw_output is set to TRUE, then the sha1 digest is instead returned in raw binary format with a length of 20, otherwise the returned value is a 40-character hexadecimal number. My current code is char *concat = "somestring"; int i = 0; unsigned char hash[SHA_DIGEST_LENGTH]; char buf[SHA_DIGEST_LENGTH*2]...
doc_14045
Please, any help is welcome. So far I've had all columns I need in one table but after normalising the database to 3NF I'm not sure of how to insert into all of them.. A: You need to use two insert statements. In the first statement you have insert data in the primary table and in the second statement you have to inse...
doc_14046
I did this: select dayname(People.birth) as day, count(*) from People group by dayname(People.birth) group by count(*) desc but this basically just returns dayname of the date when most people were born. What I need, is to take from each week the day when most people were born, and return the day that is most common f...
doc_14047
* *Visitor_id *Event_name *Story *Chapter Story consists of chapters. A user reads a chapter and then hits the paywall to continue to the next chapter where she can either do a purchase or wait for the next day to read the next chapter. Event names can have following values: “read”, “purchase” visitor_id ev...
doc_14048
Toy Story Card Game Something Wild! Case (4) English Version Toy Story Card Game Something Wild! Case (4) Toy Story Card Game (hoi) Something Wild! Case (4) But the (hoi) shouldn't match. What i have tried: \(([^\)]+)\)$ --> only matches the last example [\d\()-]+ --> only matches first example. A: The first try...
doc_14049
I found a related question over at https://stackoverflow.com/a/39963576/14731 but it focuses on routing multiple incoming IPs to the same instance. My application is a web client that needs to make multiple outgoing connections from multiple source IPs. A: Yes it's possible, with some steps: * *Create the same numb...
doc_14050
ERRORS: <class 'polls.admin.PersonAdmin'>: (admin.E108) The value of 'list_display[4]' refers to 'age', which is not a callable, an attribute of 'PersonAdmin', or an attribute or method on 'auth.User'. <class 'polls.admin.PersonAdmin'>:(admin.E108) The value of 'list_display[5]' refers to 'city', which is not a callabl...
doc_14051
This is the HTML string that I have: <p>Paragraph one.</p> <p><strong>Paragraph <em>two</em></strong>.</p> <p>Some <strong>other paragraph</strong> three.</p> <p>Last paragraph - paragraph four.</p> <table> <tbody> <tr> <td>Table paragraph one</td> <td>Table paragraph two</td> ...
doc_14052
import random cards_numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'] card_color = ["red", "yellow", "blue", "green"] other_cards = ["reverse", "+2", "+4"] while True: random_numbers = random.choice(cards_numbers) random_colors = random.choice(card_color) random_cards = random.choice(other_card...
doc_14053
111 private transient Object[] elementData; 381 public E get(int index) { 382 rangeCheck(index); 383 384 return elementData(index); 385 } On compilation does this result in a warning like "ArrayList.java uses unchecked or unsafe operations."? A: elementData(ind...
doc_14054
I have got it so that I can log in using the LinkedIn button and retrieve the firstName, lastName data as per their example, but I would like to extract a full profiles-worth of data. I have seen in the documentation that it is possible to obtain an XML file of a users profile, but I could not find any sample code that...
doc_14055
I could not find much helpful information online and pretty much have no idea where to start. I am pretty sure others may have the same questions, so thought to ask it here. Thanks
doc_14056
How can I create an third part app activity? Could anyone help me out? Thanks a lot! Error: No activities found. Did you forget to launch the activity by calling getActivity() or startActivitySync or similar? Test Code: public void testHelloWorldOnView() { try { Context context=getInstrumentation().getCo...
doc_14057
function getAllIds($db) { $stmt = $db->query("SELECT id from users;"); $array = $stmt->fetchAll(); return $array; } foreach (getAllIds($db) as $ids) { $uuid = uuid(); print "$uuid\n"; $stmt = $db->prepare("update users set user_uuid = ?"); $stmt->execute(array($uuid)); } A: The problem is that you are always updatin...
doc_14058
Sub counters() Dim rng, rng2, rng3, rng4 As Range Dim lrow, lr, lr2, lr3, lr4 As Long Dim ws, ws1 As Worksheet Set ws = Sheets("Data") Set ws1 = Sheets("Table E-1 Zip Codes PIF") lr = ws.Cells(Cells.Rows.Count, "D").End(xlUp).Row lr2 = ws.Cells(Cells.Rows.Count, "X").End(xlUp).Row lr3...
doc_14059
But I want those cid that satisfy my date range constraint. What I mean is, I want distinct cid that were added to my Elasticsearch Database during the given time range. I have tried many approaches, most of them just return all values and don't aggregate. { "aggs": { "daterange": { "range": { ...
doc_14060
But I feel very unconfortable with the ` filterContext.ActionParameters["captchaValid"] = recaptchaResponse.IsValid; Because: * *I've a strongly typed view, with validators *The day I will change the property name without remembering this string field, it won't works. So I searched how to edit an ...
doc_14061
Defines if closing for non closed nodes must be done at the end or directly in the document. Setting this to true can actually change how browsers render the page. Default is false. Sorry, I have to admit I do not understand this paragraph. Specifically "at the end" of what? And what does "in the document" mean...
doc_14062
* *Map center initial position *Map initial zoom *Map initial type Then show an example map and save in into the @AppStorage My initial position is determined from an array of data which include : * *Place name *Place Latitude *Place Longitude Latitude and Longitude is find via a function which return a Doubl...
doc_14063
@Entity @FilterDef(name="byTenantIdFilter", parameters={ @ParamDef( name="tenantId", type="long") }) @Filter(name = "byTenantIdFilter", condition = ":tenantId = tenant_id") @Table(name = "USER_ACCOUNT") public class User { @Column(name = "USER_ID") @Id @GeneratedValue(strate...
doc_14064
model1.py from os.path import join, dirname from peewee import * from playhouse.sqlite_ext import * _db = SqliteDatabase(join(dirname(__file__), 'db1.sqlite')) class Student(Model): name = CharField() sex = CharField() class Meta: database = _db def __str__(self): return 'student na...
doc_14065
(def assoc (fn assoc ([map key val] (. clojure.lang.RT (assoc map key val))))) * *What is the meaning of clojure.lang.RT? *What is the complexity of calling assoc on a vector/map? *What is the complexity of accessing a structure that has been created by assoc? A: * *clojure.lang.RT is the main Clojure RunTi...
doc_14066
├───.idea │ ├───inspectionProfiles │ └───runConfigurations ├───dist ├───src │ ├───beans │ │ └───__pycache__ │ ├───files │ ├───unifiAdopter.egg-info │ └───__pycache__ ├───tests ├───unifiAdopter.egg-info └───venv ├───Include ├───Lib └───Scripts I want to ignore directory .idea, dist and venv....
doc_14067
In single page application when we are not logged in, we include all of our .js file in main index file. This contains js file that is only needed when users are logged in. What is better approach of managing angular app in this context? A: Simple answer: yes. Your application is a single-page one, so you can combine ...
doc_14068
After about an hour of research I'm no closer to finding even a partial solution for either of the two steps, so I'm reaching out to the community. * *Is it possible to build a pipeline job that backs up Jenkins in aws and if so, how? *Can a Jenkins plugin update be triggered by a job, and if so, how? I'd be shoc...
doc_14069
# models.py class AcademicGroup(models.Model): students = models.ManyToManyField( 'user.Student', ) vk_chat = models.OneToOneField( 'Chat', ) class Chat(models.Model): owner_id = models.BigIntegerField() name = models.CharField() # admin.py class AcademicGroupInline(admin.T...
doc_14070
Private Sub CommandButton1_Click() ListBox1.List = Range("B7:B22").Value 'Private Function SelectedKits() As Integer 'Dim i As Integer 'For i = 0 To ListBox1.ListCount - 1 'For i = LBound(ListBox1.List) To UBound(ListBox1.List) 'If ListBox1.Selected(i) Then 'SelectedKits = ActiveCell.Offset(0, 4).Value 'End If 'Next ...
doc_14071
for example: anotherTest <- function(data,...){ cols = enquos(...) testFunc <- function(df, more){ df %>% mutate(!!!c(more)) } n <- length(cols) addMutation <- replicate(n, testFunc, simplify=FALSE) print(addMutation) addCars <- replicate(n, data) mapply(function(x, y, z) x %>% reduce(., y, z),add...
doc_14072
So I was wondering if it actually makes any difference to use a wildcard in a cp statement, as opposed to sending individual cp statements? What is the "standard" to use here? Or are both resulting in the same client-side and server load? as an example, I have now written code to group files based on their batch id and...
doc_14073
I want to mock the third party method for unit testing, and supply different response arguments to the callback to ensure that its logic executes correctly. For example to check that the promise is rejected when the status is NOT 'success', or that on success just the saved record is returned and not the whole response...
doc_14074
http://visjs.org/examples/network/nodeStyles/imagesWithBorders.html But not for all images. I try to append the settings for the node that should get the border like this if(some expression){ aService.shapeProperties = {useBorderWithImage:true}; aService.nodes = { borderWidth:100, ...
doc_14075
# In R\Test.R : #' @import methods #' @exportClass C C <- setClass("C") and now I change setClass to setRefClass: C <- setRefClass("C") when doing a 'Build & Reload' (in RStudio) I get the error ==> roxygenize('.', roclets=c('rd', 'collate', 'namespace')) * checking for changes ... ERROR Error in getRefClass(class...
doc_14076
First link gives a way to do it ( which doesn't work for me ) the second link gives us a few methods, namely .getEncoded() which can supposedly be called on a SecretKeyEntry to get the byte array information. Here is my code thus far, all results hit a null pointer exception when using the getEncoded message. I am sure...
doc_14077
def export data_filtered = eval(params[:data_filtered][9..-2]) CSV.open("data.csv", "wb") do |csv| csv << data_filtered.first.keys data_filtered.each do |hash| csv << hash.values end end end Currently this does indeed create a file called data.csv on my computer but i...
doc_14078
<input onkeyup="searchJobsEn()" id="" type="text"> Webpack.js is included in page source. When I try execute p.ex. searchJobsEn() I am receiving error : admin:18 Uncaught ReferenceError: searchJobsEn is not defined at HTMLInputElement.onkeyup (admin:18) How to call this function in HTML?
doc_14079
http://localhost/movies/index/12/Movie-Name here 12 is the movie id which is used for fetching values from db and movie name, which is using for SEO URL. I would likes to rewrite this URL to http://localhost/12-Movie-Name I already removed index.php from my application using http://codeigniter.com/wiki/mod_rewrite P...
doc_14080
y=[2.103402,2.426855,1.011672,1.595371,1.861879,2.492542,2.567561,4.685010,4.452643,5.321630,6.637233, 6.109260,6.220958,5.928408,5.654726,5.498096,5.468448,6.128418,6.071376,6.487270,6.609533,6.907320, 7.626838,8.432065,9.749410,8.976752,8.742036,8.779956,8.212357,8.578200,9.170012,9.134267,9.199465, 9.094945,9.342948...
doc_14081
i know you can prevent the client from being able to access the database with the command: meteor remove insecure my code currently adds, retrieves records by using Meteor.methods() so although the client is not able to insert data into a collection, it can use the Meteor.method() function. im concerned about holding ...
doc_14082
new myClass().move(); However, this is also valid: move(); I understand the first attempt (new myClass().move()) creates an instance of the class and then calls the method on it. Does the second attempt also do the same thing but implicitly? In other words, are the 2 attempts really the same? If not, what is the fund...
doc_14083
application.properties file.number=select-1 file.1.name=test file.2.name=abcd now here is my code @Value("#{'${file.number}'.split('-')[1]}") private String filenumber; the above will give me value as 1 now I want to use it in below variable to fetch file name @Value("${file.#filenu...
doc_14084
* *bootloader (0x8000000) *main application (0x8004000) In my bootloader, i have a function that will jump to 0x8004000 address and run that application But, i want to know, when i jump to that address: * *bootloader application still running? *memory allocated in bootloader remains? or i need to free manuall...
doc_14085
# Converts temperature celsius to farhenheit def celsius_farhenheit(temp_celsius): temp = temp_celsius * 1.8 + 32 return temp #Tests the celsius to farhenheit conversion function t1 = celsius_farhenheit(20) print t1 #Converts farhenheit to celsius def farhenheit_celsius(temp_farhenheit): temp = celsius_far...
doc_14086
select p.*, group_concat(distinct c.name SEPARATOR ',') categories from products p inner join product_category pc on p.id = pc.product_id inner join categories c on pc.category_id = c.id group by p.id using linq. I tried var result = (from pc in ProductCategory1 join c in Categories1 ...
doc_14087
user.xhtml > UserHandler.java > UserService.java > UserDAO.java > database I know that in the UserHandler, I can get the logged in user name using the FacesContext. My question is, inside the UserService (which is decoupled from the JSF view) how can I get the name of the logged in user without using FacesContext? I ...
doc_14088
{ char* name; char* scope; int permission; }; struct stable { stable_item* item; stable * next; stable * prev; }; stable* head; //structures created stable *GetNewNode() { stable *newNode = new stable(); newNode->item; newNode->next = NULL; newNode->prev = NULL; return ne...
doc_14089
Blender is doing that, and it seems that it works well for it. EDIT: The point of my question is not about using an external library or making my own. My main concern is about the use of libraries that use opengl as backend. Agar, CEGUI or Blender's GUI for instance. Thanks. A: You're losing the native platforms capab...
doc_14090
My environment is using bootstrap and jQuery but we're not interested in other third party code if we can avoid it. Solution must work in Chrome and Safari - but the more support the better. EDIT: As requested, here's an example using a simple <select> list with many <option> elements. * *Click on the dropdown to sh...
doc_14091
#include "python2.6/Python.h" and linking -lpython2.6 does the target computer (computer running the final compiled program) need to have python installed in order to work with my application? thanks A: It depends. Are you linking the libraries statically or dynamically? If you link dynamically then yes your target c...
doc_14092
['32 68', '56 78', '77 99'] I want to o/p another array which will contain the sum of each element in the index using JavaScript (NodeJS). Something like, ['100', '134', '176'] I tried to use .split("") but the double integer number again gets separated as separate digits. Is there any other way to solve this? Please...
doc_14093
*-element? I have a navigation bar made from an unordered list in HTML. Within my list I have another nested list which acts (or is supposed to act) as a dropdown-menu. I will let the markup speak for itself: <ul> <li><a href="#">Produkter</a> <ul class="dropdowncontent"> <li><a href="#">Moderko...
doc_14094
I'm trying to understand the graphics stack in linux. A: First hit when searching in Google for "the linux graphics stack": http://blog.mecheye.net/2012/06/the-linux-graphics-stack
doc_14095
The following MySQL statement successfully fails (if that makes sense): DROP PROCEDURE IF EXISTS Test; DELIMITER // CREATE PROCEDURE Test() BEGIN DECLARE C INT; SELECT 1 INTO C; IF(C != 0) THEN SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Error!'; END IF; END; // DELIMITER ; CALL Test(); But if I add a simp...
doc_14096
HTML <article class="twentyseventeen-panel"> <div class="panel-image"> <div style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;" > <img src="<?php echo esc_url( $thumbnail[0] ); ?>" style="width: 100%;" /> </div> </div> </article> CSS .twentyseventeen-panel { overflow: hidden; po...
doc_14097
unsigned char LRCsimple(unsigned char *p, createLRC , unsigned char length) { } Works great for mostly unsigned char arrays. Now, I have a signed array and when I use such a function and it works very well, but I have a warning when compiling the code: > ../src/apptcpipserver.c:102:9: warning: pointer targets in pass...
doc_14098
Thanks! models.py class PC(models.Model): #... mag_blacklist = models.ManyToManyField(Magasin, verbose_name="test") admin.py class PCForm(forms.ModelForm): mag_blacklist = forms.ModelMultipleChoiceField(queryset=Magasin.objects.all(), widget=forms.CheckboxSelectMultiple()) A: Yep, I am pretty much sure t...
doc_14099
I need to run a series of python scripts, with arguments, from a single Windows (2016) powershell script. The python scripts must be run as administrator (as they need access to the local registry). I've got as far as this, based on stuff in other threads on the subject: if (!([Security.Principal.WindowsPrincipal][Sec...