query_id
stringlengths
4
64
query_authorID
stringlengths
6
40
query_text
stringlengths
66
72.1k
candidate_id
stringlengths
5
64
candidate_authorID
stringlengths
6
40
candidate_text
stringlengths
9
101k
6cb228e8e5f0659e38ecff4d4a78c8a0e224e144589e67b3281464113f452b2c
['6add4d4e7bb54aaaa1edfd0321d3e7a4']
My guess is that the packages are loaded before \draftver is read in main. The simplest solution is to just load geometry using variables, and then add a switch for \newgeometry just under the draftver that users can comment or uncomment to see the boxes. I ended up using this. Class file: \newcommand\leftMargin{1.2in} \newcommand\rightMargin{1.0in} \newcommand\bottomMargin{1.0in} \geometry{letterpaper, left= \leftMargin, right=\rightMargin, bottom=\bottomMargin } Main.tex: \renewcommand{\draftver}{1.0} % Uncomment this line to show boxes around margins for positioning %\newgeometry{left=\leftMargin,right=\rightMargin,bottom=\bottomMargin,showframe} That way, it doesn't matter what visual changes the draft makes, and I still have one location for changing margins. While that doesn't directly answer my question, it gets the job done!
dbd637cd21ba698328a39eb406e1ce9c7d85bbe9b31e8552f7057c1221ba8711
['6add4d4e7bb54aaaa1edfd0321d3e7a4']
I'm trying to make the horizontal scrollbar appear when the table width is less that the total column widths. I have set the width for each column, but somehow it treats the numbers like ratios. If I define 2 columns with the same width value, the columns will have 50% width. For example, columns.Bound(p => p.column1).Width(40); columns.Bound(p => p.column2).Width(40); would be rendered the same way like columns.Bound(p => p.column1).Width(100); columns.Bound(p => p.column2).Width(100); So, if the columns have 20 and 30, the columns would 40% and 60% of the width respectively. Considering that I have set the width for each column, what do I miss? Picture: http://i.imgur.com/0uTiWE8.png
8fa6f4662f96a7692872eef7eacd3323aa1db96761e8addda2d94f2c4d4634c8
['6ae236ca1045435da52520863d3818e8']
Check your @drawable/icon path. Every app should have app_name stored into strings resource and their own icon which should be stored into drawable folder. Check if it exist. Probably you are using standard icon which can be not required and you should to add your own icon to project. Anyway I recommend to read about manifest file
44c48bc2c76c18258651add1bad745beda3c6e331ab05a1ec0a7b06a3276c67c
['6ae236ca1045435da52520863d3818e8']
For my 12 grade folio task I need to find alternate ways of finding the bonding angles in a methane molecule (regular tetrahedron). I have already done it through vector methods, co-ordinate geometry and triangle theorems. I was wondering if anyone knows of, or can explain to me, any advanced maths that can find the bonding angle or theorems that can be used to deduce it. If anyone could help it would be much appreciated.
338bb221ceea8b3a1b8729fec9bebea6b26dce023b93a27342c91bd908728b15
['6b0319ec99dc44ba977b2902e424def0']
you should reinitialize Scanner reference before scanning input public static void main(String args[]) { Scanner scanner = null; boolean isRunning = true; int input; while (isRunning) { System.out.println("insert a number:"); try { scanner = new Scanner(System.in); input = scanner.nextInt(); inputToString(input); isRunning = false; } catch (InputMismatchException e) { System.out.println("input musi byt <PERSON>"); isRunning = true; } } } public static void inputToString(int input) { System.out.println(input); } this works
d6f62b63a7a18bfb9d1c25e3b1e0954e7f5070c308c04d54e93b66abd5254ff2
['6b0319ec99dc44ba977b2902e424def0']
Try with this (i've used a string as input): String original = "Bangalore is a city"; System.out.println("Original : "+original); StringBuilder inverted = new StringBuilder(); StringBuilder output = new StringBuilder(); String temp = ""; String[] split = original.split("\\s+"); for (int i = split.length - 1; i >= 0; i--) { inverted.append(split[i]); } temp = inverted.toString(); for (String string : split) { int currLenght = string.length(); String substring = temp.substring(0,currLenght); temp = temp.replaceAll(substring, ""); output.append(substring).append(" "); } System.out.println("Converted : "+output.toString());
e161efa1eae6456ad1f23f24deec919ed1b8905eb67ee1606a69df40e4b601ea
['6b03dd77dde74c62bb0728b21037dc02']
Thank you! This made me realize that I applied *the limit rule* for *limit of a quotient* when I wasn't supposed to, for the denominator is zero and you cannot separately apply the quotient rule if the denominator is zero. (see property #4: http://tutorial.math.lamar.edu/Classes/CalcI/LimitsProperties.aspx)
588c353643f90247207b84b99ccfa5f06995657354e591fb497956cb811a2ff0
['6b03dd77dde74c62bb0728b21037dc02']
Is there a easing function that animates slower in the middle, and faster at the beginning and end? The easing functions I've seen so far are: ease, ease-in, ease-out, ease-in-out. ease seems pretty similar to ease-in-out, which slows the animation at the beginning and end. I kind of want the opposite of that. I'm creating a javascript animation to animate properties that can't be animated by css, such as linear-gradient.
607c073e63313d5f28825fe910ad22cb22fa302613ccb764cbc84f6338116210
['6b08510451b64a82aa616c083d7f23b8']
I have the following code sample in VB .net 2008 Public Function CheckPathFunction(ByVal path As String) As Boolean Return System.IO.File.Exists(path) End Function Public Function PathExists(ByVal path As String, ByVal timeout As Integer) As Boolean Dim exists As Boolean = True Dim t As New Thread(DirectCast(Function() CheckPathFunction(path), ThreadStart)) t.Start() Dim completed As Boolean = t.Join(timeout) If Not completed Then exists = False t.Abort() End If Return exists End Function Unfortunately I have to work with Vb .net 2005 and net framework 2.0; How can I accomplish the same for VB .net 2005?, VB .net 2005 does not support the syntax corresponding to the code line num. 3: Function() CheckPathFunction(path) Please note that the function to call requires a parameter and returns a value I've tried using a delegate as indicated next but does not work Private Delegate Function CheckPath(ByVal path As String) As Boolean Public Function CheckPathFunction(ByVal path As String) As Boolean Return IO.File.Exists(path) End Function Public Function PathExists(ByVal path As String, ByVal timeout As Integer) As Boolean Dim checkPathDelegate As New CheckPath(AddressOf CheckPathFunction) Dim exists As Boolean = True Dim t As New Thread(checkPathDelegate(path)) t.Start() Dim completed As Boolean = t.Join(timeout) If Not completed Then exists = False t.Abort() End If Return exists End Function Thanks
b70d792836dffa345c982483ff0e0bc4e054de8fde6323889c6f08c8a23ba1ac
['6b08510451b64a82aa616c083d7f23b8']
I finally achieved the desired functionality adding a new field/column to the Datatable and instead keeping just one value for the entire row in that field, I store string representing the state/style for each cell like ",,E,,,E" so this sample string would indicate that the cell at index 2 and 5 should have an edited style. I create/change that string in the CellValueChanged event, sample: Private Sub DataGridView_CellValueChanged(sender As System.Object, e As DataGridViewCellEventArgs) Handles DataGridView.CellValueChanged If e.RowIndex = -1 Or IsNothing(DataGridView.CurrentCell) Then Return End If Dim cellPosition As Short = DataGridView.CurrentCell.ColumnIndex Dim Styles(25) As String Dim stylesCell = DataGridView.Rows(e.RowIndex).Cells("CellStyleDescriptor").Value If Not IsDBNull(stylesCell) And _ Not IsNothing(stylesCell) Then Styles= Split(stylesCell, ",") End If If IsDBNull(DataGridView.Rows(e.RowIndex).Cells("Id").Value) Then For i As Integer = 0 To 25 'New row is being added Styles(i) = "N" Next Else Styles(cellPosition) = "E" 'Edited/Modified Cell End If DataGridView.Rows(e.RowIndex).Cells("CellStyleDescriptor").Value = String.Join(",", String) End Sub and read/apply the styles in the CellFormatting event, sample: Private Sub DataGridView_CellFormatting(sender As System.Object, e As DataGridViewCellFormattingEventArgs) Handles DataGridView.CellFormatting If e.RowIndex = -1 Or e.ColumnIndex = -1 Then Return End If Dim styles(25) As String styles = Split(DataGridView.Rows(e.RowIndex).Cells("CellStyleDescriptor").Value, ",") Select Case styles(e.ColumnIndex) Case "E" 'Edited cell e.CellStyle.BackColor = modifiedStyle.BackColor e.CellStyle.ForeColor = modifiedStyle.ForeColor Case "N" 'New cell e.CellStyle.BackColor = newStyle.BackColor e.CellStyle.ForeColor = newStyle.ForeColor End Select End Sub I hope this helps someone
34090a11998f6e8ff2298362d7a87056d8cf0c6fb0b5c2534f996a5154f9b9d9
['6b091e55f9004027bb26e3c364596854']
I am developing a feature that needs a variant of read/write lock that can allow concurrent multiple writers. Standard read/write lock allows either multiple readers or single writer to run concurrently. I need a variant that can allow multiple readers or multiple writers concurrently. So, it should never allow a reader and a writer concurrently. But, its okay to allow multiple writers at the same time or multiple readers at the same time. I hope I was clear. I couldn't find any existing algorithm so far. I can think of couple of ways to do this using some queues and etc. But, I dont want to take a risk of doing it myself unless none exists. Do you guys know of any existing scheme? Thanks,
a96129ff6b3c3ebf3a0d5358879efae53e88f6775300479daee37156b42dc883
['6b091e55f9004027bb26e3c364596854']
At first glance, my question might look bit trivial. Please bear with me and read completely. I have identified a busy loop in my Linux kernel module. Due to this, other processes (e.g. sshd) are not getting CPU time for long spans of time (like 20 seconds). This is understandable as my machine has only single CPU and busy loop is not giving chance to schedule other processes. Just to experiment, I had added schedule() after each iteration in the busy loop. Even though, this would be keeping the CPU busy, it should still let other processes run as I am calling schedule(). But, this doesn't seem to be happening. My user level processes are still hanging for long spans of time (20 seconds). In this case, the kernel thread got nice value -5 and user level threads got nice value 0. Even with low priority of user level thread, I think 20 seconds is too long to not get CPU. Can someone please explain why this could be happening? Note: I know how to remove busy loop completely. But, I want to understand the behaviour of kernel here. Kernel version is 2.6.18 and kernel pre-emption is disabled.
899db750dd4022e6acd050827473da082e88dc25bfcea9af3b9416bc49bf57f2
['6b14a3bc58b94d9e813809761dc33cc3']
const expect = require('chai').expect, // extarnal js files | files to test .. demoJs = require("../src/JS/demo.js"), //jsdom stuff jsdom = require('jsdom'), { JSDOM } = jsdom, doc = new JSDOM(), //jquery stuff jquery = require('jquery') ; // setting $ to global $ = global.jQuery = require('jquery')(doc.window); describe('jQuery : jsdom testing ', () => { it('testing if jquery can access a p element', () => { expect($("<p>hi</p>").text()).to.equal("hi") expect($("<p>hola</p>").text()).to.equal("hola") }); });
4c7e02d614d07c39f6b3ea98a304349a2ee0456efeaeccf9e7e0dde188ca5a6d
['6b14a3bc58b94d9e813809761dc33cc3']
ok , first off all [ $('entry-link > ul li') ] this is not valid selector. you must use a css identifier. like [for class (.)] etc.. so use the selector as $('.entry-link > ul li'); the (.) is important and test the demo i post . it may sold the problem easily [ use hover ]. visit the DEMO
53945dac2d3ddea5736d85802af702802e1589e6b24644379e13126853287c83
['6b1999b475ab45bab2d5fca3f3f7a538']
I am trying to get each frame from the replaykit using startCaptureWithHandler. startCaptureWithHandler returns a CMSampleBufferRef which i need to convert to an image. Im using this method to convert to UIImage but its always white. - (UIImage *) imageFromSampleBuffer3:(CMSampleBufferRef) sampleBuffer { CVImageBufferRef imageBuffer = CMSampleBufferGetImageBuffer(sampleBuffer); size_t width = CVPixelBufferGetWidth(imageBuffer); size_t height = CVPixelBufferGetHeight(imageBuffer); NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES], kCVPixelBufferCGImageCompatibilityKey, [NSNumber numberWithBool:YES], kCVPixelBufferCGBitmapContextCompatibilityKey, nil]; CVPixelBufferRef pxbuffer = NULL; CVPixelBufferCreate(kCFAllocatorDefault, width, height, kCVPixelFormatType_32ARGB, (__bridge CFDictionaryRef) options, &pxbuffer); CVPixelBufferLockFlags flags = (CVPixelBufferLockFlags)0; CVPixelBufferLockBaseAddress(pxbuffer, flags); void *pxdata = CVPixelBufferGetBaseAddress(pxbuffer); CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB(); // CGContextRef context = CGBitmapContextCreate(pxdata, width, height, 8, CVPixelBufferGetBytesPerRow(pxbuffer), rgbColorSpace, kCGImageAlphaPremultipliedFirst); CGContextRef context = CGBitmapContextCreate(pxdata, width, height, 8, CVPixelBufferGetBytesPerRow(pxbuffer), rgbColorSpace, kCGImageAlphaPremultipliedFirst); CGImageRef quartzImage = CGBitmapContextCreateImage(context); CGColorSpaceRelease(rgbColorSpace); CGContextRelease(context); CVPixelBufferUnlockBaseAddress(pxbuffer, flags); UIImage *image = [UIImage imageWithCGImage:quartzImage scale:1.0f orientation:UIImageOrientationRight]; CGImageRelease(quartzImage); return image; } Can anyone tell me where im going wrong?
f0c6ca859817979475e3d69e4aed935d510ccc6a5c4fcc531380ee6a82e59f5f
['6b1999b475ab45bab2d5fca3f3f7a538']
I created an objc project which has the broadcast upload extension added to it. My aim is to send the CMSampleBufferRef which is returned in the extension to the main app. I want to be able to change and modify the CMSampleBufferRefs in the main app. I cannot do much changes to the sample buffers in the extension as there is a 50MB memory limit. My aim is to be able to create a video from the sample buffers.
74b4fb967a0cb4847996f490bc1877a440f92cc0f463a196346eacaa6384e536
['6b239d2a1da44b90b00838cd2e49e3be']
My users need to upload large amounts of files to a site (only HTTP access). Also, no matter how much I tell them to shoot the pictures in low resolutions they keep coming back with Massively sized images. Obviously, they complain that it takes them to long to upload all the files thru a simple HTML form - I'm planning on switching to SWFUpload (http://www.swfupload.org/). Any other suggestions or experiences? I'm programming in LAMP using the CakePHP and jQuery frameworks - solution also needs to be browser agnostic (no ActiveX crap) and not use Java.
29807fee41eb96bd1c81e5c7cb1803b77aab6d20134fb8eaecf923b091995948
['6b239d2a1da44b90b00838cd2e49e3be']
Creating a page with multiple "like" buttons on it. I'm using their XFBML syntax so when someone "likes" one of the items on the page they can post a message on their wall (default behaviour w/ XFMBL). Sometimes the pop-up shows up but sometimes it flashes away - can't seem to find a pattern why. I have tried this in Opera, IE, FF (latest released versions of each). Eveything looks according to FB's documentation. See the page at: http://ncaa.rmingorance.mouse.engauge.com/bracket (note, I can't use the iframe version because I can't give it enough width for the pop-up to work - the pop-up should always work with XFBML according to the docs)
dc471214e9bb1c7392b0dd9472a1b7d137b85cd8b279c3938582d5a11c9fa4b2
['6b29a18928924a6ca1cb34c41a868791']
im new to the express and react Trying to make my first app but i have a problem with operating on my data from express. Express const express = require('express'); const bodyParser = require('body-parser'); const app = express(); const port = process.env.PORT || 5000; app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); app.get('/favcolors', (req, res) => { const colors = [ 'red', 'green', 'yellow' ]; res.json(colors); }); app.listen(port, () => console.log(`Listening on port ${port}`)); React class App extends React.Component { constructor(props) { super(props); this.state = { colors: [] } } callApi = async () => { const response = await fetch('/favcolors'); const body = await response.json(); if (response.status !== 200) throw Error(body.message); return body; }; componentDidMount() { this.callApi() .then(colors => this.setState({colors}, () => console.log('Fetch data ', colors))); console.log(this.state.data) } wantYellow = () => { this.setState({}); }; render() { return ( <div> <h1> Fav colors: {this.state.colors[0]} </h1> <button type="button" onClick={this.wantYellow}> Change </button> </div> ); } } export default App; I want to change "Fav Color " from red - this.state.colors, to yellow using a button but i dont know how to do it. Can you give me some examples?
2b5653844341d893f574514fc2a39374e05a8cc394d5c21c6e9f3fc9cd5ed75e
['6b29a18928924a6ca1cb34c41a868791']
What is the easiest way to launch a node.js script from a react-app by using a button? I've a simple app with two buttons - using Material.io export default function ButtonsMenu() { const classes = useStyles(); return ( <Grid> <Grid item xs={12}> <Paper style={styles.Paper}> <Button onClick={activeLights} variant="contained" color="primary" className={classes.button}> ON </Button> <Button onClick={inactiveLights}variant="contained" color="secondary" className={classes.button}> OFF </Button> </Paper> </Grid> </Grid> ); I also have an Arduino with led stripe that i wrote a node.js code for. How can i run it from the browser? I know that i need a node server and a client, but need some help what should i do next. I would appreciate any github repository etc.
96ef09cecafdef4949d9af973d517e4fa8134a251007dd3d37f3e13adb1786c8
['6b2fd513012d4371853d77e8f3347e6a']
What are the conditions about the equality between a function and his Fourier series? In case of pointewise convergence of the series, I know that the series converges pointewise at the value $$\frac{f(x_+) + f(x_-)}{2}$$ But in the points of discontinuity, the function may not assume exactly that medium value, for example a function that is equal to $x^2$ in $(0,2\pi)$ and 0 in $x=2\pi$, in this case, in the discontinuity points, the series converges at a function that is not equal to the initial function. Maybe can I say the same that the series is equal to the initial function? Or not? There are some conditions to know when the function is exactly equal to the series?
650433e3da6d1f85fd810119ac03ed0c135121a691c7e5ded58d442a332b3820
['6b2fd513012d4371853d77e8f3347e6a']
I have a network topology that looks like so: Internet--------------------Firewall-------------------------Server 0.0.0.0/0-----172.8.45.140 & 192.168.1.1-----192.168.1.2 I need to configure the Firewall using iptables to port forward incoming ssh connections from my remote client (on the Internet) to the server (on 192.168.1.2). Essentially executing ssh user@172.8.45.140 on the client to remote into the server on 192.168.1.2. The Firewall has two NICs to communicate: 172.8.45.140 (public) is on interface ens33 192.168.1.1 (private) is on interface ens37 The Server has the private IP of <IP_ADDRESS><IP_ADDRESS>/0-----<IP_ADDRESS> & <IP_ADDRESS>-----<IP_ADDRESS> I need to configure the Firewall using iptables to port forward incoming ssh connections from my remote client (on the Internet) to the server (on <IP_ADDRESS>). Essentially executing ssh user@<IP_ADDRESS> on the client to remote into the server on <IP_ADDRESS>. The Firewall has two NICs to communicate: <IP_ADDRESS> (public) is on interface ens33 <IP_ADDRESS> (private) is on interface ens37 The Server has the private IP of 192.168.1.2 and has been configured to use port for 54045 for SSH, not the default 22. Iptables on the Firewall has been configured that both chains INPUT and FORWARD have been changed to the policy DROP, the chain OUTPUT still has the default policy ACCEPT. Chain INPUT (policy DROP) target prot opt source destination Chain FORWARD (policy DROP) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination I have seen some guides online detailing how to port forward web requests to a web server behind a firewall, see: https://www.systutorials.com/port-forwarding-using-iptables/ https://www.digitalocean.com/community/tutorials/how-to-forward-ports-through-a-linux-gateway-with-iptables https://wikileaks.org/ciav7p1/cms/page_16384684.html Following these tutorials I have enabled port forwarding on the Firewall via the /etc/sysctl.conf file and tried the following rules: 1st Attempt INPUT and FORWARD policy DROP, OUTPUT policy ACCEPT. sudo iptables -A PREROUTING -t nat -i ens33 -p tcp --dport 22 -j DNAT --to <IP_ADDRESS>:54045 sudo iptables -A FORWARD -p tcp -d <IP_ADDRESS> --dport 54045 -j ACCEPT Result: SSH operation timed out. Also tired INPUT and FORWARD policy ACCEPT still operation timed out. 2nd Attempt INPUT and FORWARD policy DROP, OUTPUT policy ACCEPT. sudo iptables -A FORWARD -i ens33 -o ens37 -p tcp --syn --dport 22 -m conntrack --ctstate NEW -j ACCEPT sudo iptables -A FORWARD -i ens33 -o ens37 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -A FORWARD -i ens37 -o ens33 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT sudo iptables -t nat -A PREROUTING -i ens33 -p tcp --dport 54045 -j DNAT --to-destination <IP_ADDRESS> sudo iptables -t nat -A POSTROUTING -o ens37 -p tcp -d <IP_ADDRESS> -j SNAT --to-source <IP_ADDRESS> Result: SSH operation timed out. Also tired INPUT and FORWARD policy ACCEPT connection refused. 3rd Attempt INPUT, FORWARD and OUTPUT policy ACCEPT. sudo iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination <IP_ADDRESS>:54045 sudo iptables -t nat -A POSTROUTING -j MASQUERADE Result: This did work but only when the chain FORWARD had its policy on ACCEPT. This is the only time I got a connection through the firewall. When I changed the chain FORWARD to DROP the SSH connection would time out again. My guess it is something to with it being masqueraded or that FORWARD policy DROP has something to do with it. My question is what am I overlooking? It’s probably something I’ve missed all this time that is staring me in the face. Please be kind and thank you for your help.
5802c949fe352f68629e91ce68c9fcd9dfa60889d79793d3485c298eaa76fad1
['6b304dd3534f481088f28d0ff7c33bb1']
I keep getting this error when trying to use my form to submit data into mysql "Insertion Failed:Column count doesn't match value count at row 1" <?php include 'dbc.php'; $rank = $_POST['rank']; $lname = $_POST['lname']; $fname = $_POST['fname']; $platoon = $_POST['platoon']; $squad = $_POST['squad']; $justsuta =$_POST['justsuta']; $fdate =$_POST['fdate']; $tdate =$_POST['tdate']; $ddate1 =$_POST['ddate1']; $ddate2 =$_POST['ddate2']; $ddate3 =$_POST['ddate3']; $sdate1 =$_POST['sdate1']; $sdate2 =$_POST['sdate2']; $sdate3 =$_POST['sdate3']; $sql_insert = "INSERT into `forms` (`rank`,`lname`,`fname`,`platoon`,`squad`,`justsuta`,`fdate`,`tdate`,`ddate1`,`ddate2`,`ddate3`,`sdate1`,`sdate2`,`sdate3`) VALUES('$rank','$lname','$fname','$platoon','$squad','$justsuta','$fdate','$tdate','$ddate1','$ddate2','$ddate3','$sdate1','$sdate2','$sdate3', NOW())"; mysql_query($sql_insert) or die("Insertion Failed:" . mysql_error()); ?> Do i have something wrong with my code? Thank you for your help in advance
c66c439dbed0ed1e6cc186cdb4720262a056de08f34047e50a63732f4caf16ce
['6b304dd3534f481088f28d0ff7c33bb1']
I am trying to produce an outcome if both rows in two different tables match, but I am having a hard time trying to make it work. Can someone please tell me if I am missing something.. Thank you in advance **Note: my connections are in an included file and both tables are in the same database <html> <p>Pending Documents</p> <?php $sql ="SELECT * FROM `forms`"; if ($_SESSION['user_name'] == $row["username"]){ ?> <p><a href="">SUTA Document</a></p> <? }else { ?> <p>No Pending Documents</p> <? } ?> </html>
facd67745a7083570feb86bac67fb2475fddd64fa011572b01c186eb9cc2060a
['6b388306a3dc4db59cba15af2bab01f8']
Using Dagger in raw Java and have this issue when I try running my code: java.lang.NoClassDefFoundError: dagger/internal/Preconditions I am using ANT for compiling (have no other choice). Here is my dependencies I setup for Dagger: <pathelement location="${lib}/dagger-compiler-2.24.jar"/> <pathelement location="${lib}/dagger-2.24.jar"/> <pathelement location="${lib}/javax.inject-1.jar"/> <pathelement location="${lib}/guava-27.1-jre.jar"/> <pathelement location="${lib}/checker-compat-qual-2.5.3.jar"/> <pathelement location="${lib}/dagger-producers-2.24.jar"/> <pathelement location="${lib}/dagger-spi-2.24.jar"/> <pathelement location="${lib}/failureaccess-1.0.1.jar"/> <pathelement location="${lib}/google-java-format-1.5.jar"/> <pathelement location="${lib}/incap-0.2.jar"/> <pathelement location="${lib}/javapoet-1.11.1.jar"/> <pathelement location="${lib}/jsr250-api-1.0.jar"/> Does anyone know how to remedy this? All solutions I've seen across the internet are Android based, which doesn't help me.
cba104bc5f2d994325023c564e2e670cfe8611275c05194de276ed5e935acbaa
['6b388306a3dc4db59cba15af2bab01f8']
For an app I am making I track the users location on a map. When outdoors, I am able to get the coordinates of the users position almost instantly and the app works great. Indoors, as expected, does not have GPS signal so I cannot get the location. That said, iOS uses Wifi and various other techniques to show my approximate location on a MapView still. However, I am unable to get the approximate coordinate while indoors even though iOS knows it (ie. didUpdateLocations is never called while indoors but is the second I walk out the door). I'm wondering if there is a way to get an approximate coordinate while indoors (I don't need exact).
62a6617e5d8773b7b1f73c7bec603342ef67f6832a911d5978f38528b819a6a9
['6b3ff8d200a541669d2963d1979039a5']
If you've started the web server correctly using defaults, your browser would point to x.x.x.x:3000 using the ip of the webserver. Mojolicious comes with a landing page and you can add .html files under public that will be served also. So if your angular app is already built out, that whole structure will need to go under public and you will need to delete the default template served under a new mojolicious app, should look something like this: get '/' => sub { my $c = shift; $c->render(template => 'index'); }; The commands to start over: mojo generate lite_app myapp mkdir public <copy your angular app into new directory public> <delete default route> morbo myapp
c9a9d20fe3fa38afa9aeb86a03c70bd0eb25feb916c864b5a62a9023d8d8b724
['6b3ff8d200a541669d2963d1979039a5']
Here's a couple of functions that may help space() { local user=$1 local space=0 local tmp=`mktemp` find . -user $user -exec stat --printf="%s\n" {} \; 2>/dev/null >> $tmp for size in `cat $tmp`; do ((space=space + size)); done local humanized=`mb $space` echo "`pwd` $user $humanized" rm -f $tmp } mb() { local orig=$1 if [[ $orig -gt $((2**20)) ]]; then echo -n $(($orig / 2**20)) echo "mb" else echo -n $(($orig / 2**10)) echo "kb" fi } Paste these into your shell and then call it on the command line like $space <user> it will print out all the file sizes to a temporary file and then add them all up. The mb function makes it human readable. When I run it I get /home/me me 377mb Compared with du -sh . 399M . Pretty close ;)
3cc9785fc2e0b9ecdceac28ecf34affb46555c799cf170991b414cc0f3d91f71
['6b46f121c62d4a4f9823170ca21916de']
My bad; you are correct. I should have frased it differently; "currently I do say 'I do not want to update all the DNS-records'"; I am fully prepared to set my NS-records. This is easier however as most registrars offer the ability to set default nameservers for all registered domains.
0ec58a792968649170f2c4d5380e434c4e99200f0b5b8e0409ecb5673ef5a809
['6b46f121c62d4a4f9823170ca21916de']
a hd case seems useless on linux , that happened with me too ; a better solution IF you have an old desktop , you can open iit , unplug its hd and cd/dvd player , and you'll have 2 ports empty , put your both HDs and boot from the old one , and then do your stuff
19ae70cf78d830322bddd11f6de9ec6871df207d488d7b97e910616001a3e002
['6b54c3528be046b3bd2b0c01f54f0202']
there is one difference in behavior between [] and list() as example below shows. we need to use list() if we want to have the list of numbers returned, otherwise we get a map object! No sure how to explain it though. sth = [(1,2), (3,4),(5,6)] sth2 = map(lambda x: x[1], sth) print(sth2) # print returns object <map object at 0x000001AB34C1D9B0> sth2 = [map(lambda x: x[1], sth)] print(sth2) # print returns object <map object at 0x000001AB34C1D9B0> type(sth2) # list type(sth2[0]) # map sth2 = list(map(lambda x: x[1], sth)) print(sth2) #[2, 4, 6] type(sth2) # list type(sth2[0]) # int
aa62d04c53dddd601bcccd3616ee981d7d99b21b4b261fa938c784d7040ef7fd
['6b54c3528be046b3bd2b0c01f54f0202']
i made it work by modifying the print statement to the following: print("Epoch", epoch, "Batch_Index", batch_index, "MSE:", mse.eval(feed_dict={X: scaled_housing_data_plus_bias, y: housing_target})) moreover by referencing complete data set (not batches) i was able to test the generalization of the current batch-based model to the whole sample. It should be easy to extend it to test on the test and hold-out samples as training of the model progresses i am afraid that such on-the-fly evaluation (even on batches) can have impact on performance of the model. I will do further tests of that.
b4a3fa3b68e99adbaf1815db9fbfdb435fc33fe8ed39d568bb9435c77b4f2eaa
['6b5ec82f8b2a4426bc4dad913ff4d62e']
So, I have a "Open Project" menu item, and I want to set mnemonic to it. I prefer it to be 'e' character from Project word. But when I set it with openProjectMenuItem.setMnemonic('e'); it sets 'e' character from Open word as mnemonic. Is there a way to achieve what I want?
cb2931a495932a105031b439326152f6e83e722fabef8f0890ac51481a1dd477
['6b5ec82f8b2a4426bc4dad913ff4d62e']
Hi <PERSON>, Yes the host machine is Linux(CentOS) and on that two windows virtual machines are running. i just want to take my all traffic from first virtual machine which is on left side and in br0 bridge to second virtual machine which is on right side and in br1 bridge. My linux firewall should work as router so that it can route traffic from br0 to br1. Also, both bridges are in different network
6fc25cafd983e01cd8d190eda895bdfacd2fc06847b1f6e7435ffe9d19ffdc85
['6b5fb399c3af4aafaee186a57b41335e']
First you need to separate what are the most important functionalities of your room booking website. Create a list with each one and classify it. After you do that, create prototypes of screen or create forms for your users asking what are the best features to include in the app. I recommended you take a look in the Android Material Documentation. This will help you to achieve great user experience.
f5242efaaac035a9d81d08ef2328d29369eafbff03b03673a1881d75aabc4df4
['6b5fb399c3af4aafaee186a57b41335e']
To parse your JSON, that starts with "[" use the JSONArray class. JSONArray jsonArray = new JSONArray (response) Iterate in the array object to get item by item. for (int i = 0; i < array.length(); i++) { JSONObject row = jsonArray.getJSONObject(i); value = row.getString(TAG); } This is a very complete tutorial about JSON parsing: http://www.androidhive.info/2012/01/android-json-parsing-tutorial/
4620ab57db3959da64dd932eb34c86cb8271edb4c95d3762be3ff20f72ecdad4
['6b6319b6250545dcad91d5597469d975']
I need to find the Spherical Distance of two coordinates using Javascript. I am using Wolfram a lot for this project and found this formula d=cos^(-1)(P·Q) [reference: http://mathworld.wolfram.com/SphericalDistance.html]. So I know that P·Q is the dot product of the two coordinates in question. This leads to finding the dot product which I found as DotProduct = (x1*x2 + y1*y2 + z1*z2) [reference: http://en.wikipedia.org/wiki/Dot_product]. So I put together the following method and get NaN (Not a Number) every time. function ThreeDimensionalDistance(x1,y1,z1,x2,y2,z2){ return Math.acos(x1*x2 + y1*y2 + z1*z2); } Here are two sets of sample data I use and I can't figure out why I get NaN. Am I missing something small, do I need to convert my numbers to something for them to work with arc cos? Thank you in advance for any help. Sample 1 X:-1.7769265970284516,Y:-5.129885707200497,Z:-2.554761143401265 X:-0.8336414256732807,Y:-1.9876462173033347,Z:5.599491449072957 Distance: NaN Sample 2 X:-0.8336414256732807,Y:-1.9876462173033347,Z:5.599491449072957 X:0.8447772905770565,Y:4.252407300473133,Z:4.147696165367961 Distance: NaN
51cae9982e8dbd18e80525fbd563057628c00bb7d67622ca3abf109dba710365
['6b6319b6250545dcad91d5597469d975']
I finally upgraded my OS to Windows 8.1 and now my XBOX Kinect app that I built doesn't work. Also, none of the example project that come with the SDK and Development tools works either. I have the latest downloads and everything. Windows 8.1 is completely updated too. All the apps run, but it seems none of the sensors work, but the red light comes on when I run the examples. Anyone had this issues before?
66fdcc7d17f1b638e4a466fda33a9a14ccaf58c4bb1ae56a66918a8c3d02f3ad
['6b635b4151264e6b8d73a93510a02362']
I need help with the below code for a WPF .net core 3.1 app which uses Refit for handing REST APIs. I am trying to get the value of the AuthToken from the response header. But I can't find a property holds the value of the AuthorizationHeaderValueGetter. I do see some bugs related to this issue - https://github.com/reactiveui/refit/issues/689. It is claimed to have been fixed in the .net core 3.1 version. But I haven't been able to retrieve the response header yet. App.xaml.cs private void ConfigureServices(IConfiguration configuration, IServiceCollection services) { services.AddRefitClient<IService>(new RefitSettings() { AuthorizationHeaderValueGetter = () => Task.FromResult("AuthToken") }) .ConfigureHttpClient(c => c.BaseAddress = new Uri(Configuration.GetSection("MyConfig:GatewayService").Value)); } IService.cs The Interface IService has been defined as follows: [Headers("Content-Type: application/json")] public interface IService { [Post("/v1/Authtoken/")] public Task<string> Authenticate([Body] Authenticate payload); } I am Injecting IService in my ViewModel (WPF) and trying to get the the value of the "AuthToken" header which should have been set. Viewmodel public class SomeViewModel: ISomeViewModel { public SomeViewModel(IService service) { this.Service = service; } public async Task<Tuple<bool, string>> Somemethod() { var authResponse = await Service.Authenticate(authPayload); ....... } }
3b26bc675e1b754500c7534efdd84f1b9fb915da185173457c4baf4fc7dcdd8a
['6b635b4151264e6b8d73a93510a02362']
I managed to get the response header. The return type of the service has to be changed to System.Net.Http.HttpResponseMessage. [Headers("Content-Type: application/json")] public interface IService { [Post("/v1/Authtoken/")] public Task<HttpResponseMessage> Authenticate([Body] Authenticate payload); } Created an extension method which looks up the response headers to get the "AuthToken" value. public static class RefitExtensions { public static async Task<string>GetAuthToken(this Task<HttpResponseMessage> task) { var response = await task.ConfigureAwait(false); string authToken = response.Headers.GetValues("AuthToken").FirstOrDefault(); return await Task.FromResult(authToken); } } In the view model, I got the authtoken value with the following statement. var authToken = await Service.Authenticate(authPayload).GetAuthToken();
16ef4bf1d642087a0f011615ddc997b33910d91846c9f79c23574870a514b5c2
['6b643b535209464f9f1001a244f5c464']
it looks like something (most likely pg) is loading libxml before nokogiri loads. try moving nokogiri to the top of your gemfile and bundling again. if not, as suggested here you can use the libxml version that's shipped with pg (it should not have an adverse effect on nokogiri).
8366080da2513f0ebd7bf6a9d7faddce141a7c05476dd46361116d975de87885
['6b643b535209464f9f1001a244f5c464']
You need to connect your resque queues to remote instances of redis. In order to connect to remote instances of redis with you should add the below in your resque conf: Resque.redis = "redis://[host]:[port]" you can take a look at the resque/redis connection relationship here (on github) Also, it's most likely necessary that you'll need to maintain a copy of the application code on each machine where there is a worker running so that you can trigger resque via rake.
674e5807170763dd3b01901d80a577084a964c14d57469c1a336496e35991343
['6b6a61d85bff4727a99d2e847a984cbb']
I'd appreciate any hint for this problem. I've been thinking a lot about it and I don't see how to proceed. Let $X_n$ a sequence of independent positive random variables. Is it true that $$\sum_{k=1}^{\infty}E(X_i)<\infty$$ when $\sum_{k=1}^{\infty}X_i<\infty$ almost surely? I reviwed many questions in the forum but none seem to be specific about it. In fact the question Expected value of infinite sum cites some references for an additional condition for the result, but none of these references suposses the random variables are independent. Any hint or reference or counterexample? Thank you for your help.
a537c251d4aa07834bfbbefb5ed8113e6a6a9632c4b41eb7fad372072818936f
['6b6a61d85bff4727a99d2e847a984cbb']
@AreaMan what open set you refer exactly? One assures the triviality of the topology because of the density. In fact one can find a representant of every equivalence class (by the relation $a\sim b$ whenever $a-b\in\mathbb{Q}$) in any open interval $(x,y)$ so topology must be trivial on the quotient.
e13f928315729cc9b478bbee49dfe12e7889c9a09657318e23a75adbd2e45962
['6b6f8ddac07c48b7b274ee691bf44323']
One possibility I have come up with is this one: .state('A', { url: "/A", templateUrl: 'templates/A.html', controller: 'ACtrl', resolve: { transitions: function($state){ return{ nextState: function(){ $state.go('B'); } }; } } }) .controller('ACtrl', function($scope, transitions) { $scope.gotonext = function(){ transitions.nextState() }; }) I kinda like it because it leaves the transitions specified in the routing and is also generic so that you can specify all the transitions you like contextually to your state (e.g. nextState, backState, whateverState).
8cd2dbc1c5c91b11a7670b2c2c93bd39ad7ab7991b0a9e2bcd9800df09f4fcb5
['6b6f8ddac07c48b7b274ee691bf44323']
I've found the problem. It had to do with the activity that was passed to the enableAutoManage(). The activity that was passed was then destroyed, so the client got lost somewhere. It's a pity that the client has to be bound to an activity, because one cannot go through different activities with the same client, but that's the way it is. It's also a pity that there is no feedback one could rely on to debug this.
5158921e0d84c7bae326357fdfb6f8a86703a9197c62f3a63cc6ca2d70089eb8
['6b76d5f355be4615b6e2969757d4ecd2']
Do not use UI sequence, use only `InstallExecuteSequence`. Otherwise you'll get in troubles with silent installation. And why you're using `StringData` instead of `IntegerData`? As far as I can see, `Display` column is integer type. According to the log, something is wrong with this line `viewlist.Modify 6 , reclist`. Check that `reclist` is not `nothing`.
a32f769e0779fe30270677e2a887ee81f0995faa5aec87c8ce890198a40247da
['6b76d5f355be4615b6e2969757d4ecd2']
It depends on what you are considering as an "internet connection". If you want to check that you can reach some remote site then you should have some address of it. If you just want to check that the connection is exist then you could check a WAN interface status.
83ba78c75d798908ec198a41284fcc24f066ea18cb91ad0840221e5ad24720b0
['6b794a21e83743cb9c50d477875b86ad']
I would likwe to replace different combinations of whitespaces, tabs and carriage returns with a single white space. So far i got a solution that works: String stringValue=""; stringValue = stringValue.replaceAll(";", ","); stringValue = stringValue.replaceAll("\\\\n+", " "); stringValue = stringValue.replaceAll("\\\\r+", " "); stringValue = stringValue.replaceAll("\\\\t+", " "); stringValue = stringValue.replaceAll(" +", " "); Input: test\n\t\r123 ;123 Output:test123,123 is there a prettier solution to this ?
44f9b8c39a466799fda77372517836cd3caa374d4b12ba4d9d9fc45e4b7f874f
['6b794a21e83743cb9c50d477875b86ad']
I had the same issue. Maybe you were missing the registry-Attribute. At least this (https://stackoverflow.com/a/13056141/5449497) configuration worked for me: <webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"> <webflow:flow-execution-listeners> <webflow:listener ref="facesContextListener" /> </webflow:flow-execution-listeners> </webflow:flow-executor> <bean id="facesContextListener" class="org.springframework.faces.webflow.FlowFacesContextLifecycleListener" />
3de50948b611e2588af81c46a5295c5c2954cf7637e2add29689360ec28112bd
['6b7a882fcde94cf6b71e744451866b18']
I have domain name xyzabc.com and I am hosting few sample apps at my local machine Since My ISP blocks port 80, So I have to forward my domain name to Port 81; So I Defined the Forwarding (http://xx.xx.xx.xx:81) in godaddy and I configured 2 subdomains foo.xyzabc.com and bar.xyzabc.com and Used forwarding as (xx.xx.xx.xx:81) and (xx.xx.xx.xx:81) Respectively. At my Router I defined port forwarding to map external port 81 to internal port 80, at which nginx is Running. Until this point every thing is working xyzabc.com, foo.xyzabc.com with my main website content. Now I want to map tomcat when somebody type foo.xyzabc.com to localhost:8080/ And I am confused how to configure that. What I tried is : server { listen 80; server_name foo.xyzabc location / { proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-Port 81; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_redirect http://xx.xx.xx.xx:81/ http://localhost:8080/; } } And location / { proxy_pass http://localhost:8080/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 150; proxy_send_timeout 100; proxy_read_timeout 100; } And many Permutation combination but I am not able to get the Tomcat webpage when typing foo.xyzabc.com/ I will really appreciate any help in this.
a31365cb6d20db160d66f349cfbb2083d5d82a1d51ad52670ef61eac03b52e42
['6b7a882fcde94cf6b71e744451866b18']
Так в том и проблема, что когда я всё это выполняю, то при вставлении на место названия картинки переменной, содержащей ровно такое же название этой картинки, мне попросту выдаёт следующую ошибку expected str, bytes or os.PathLike object, not list. И происходит это независимо от того, как бы я не шаманил с кодом, всё равно оно ни за что не воспринимает переменную
f450ec2165e44c8884cd7b4badc11683866167566048ce560334fd1dc6f28db6
['6b7eb0a35a36438491b380be43ca5985']
Vale perfecto, soy nuevo en StackOverflow así que estoy cogiendole el tranquillo aún. Es verdad que he planteado dos preguntas en una, pero así es como me lo pide el ejercicio entonces yo la publiqué tal cual. En cuanto a qué línea imprimiría si el número resultante está entre los 4 últimos, esto ya no lo sé, pues no lo especifica el ejercicio. Supongo que en ese caso imprimiría esas 4 líneas únicamente. Muchas gracias por sus comentarios!!
0a653e60aabc53e97da884c2e4572c10c100f5d9235958280ffd6f1d3c654a70
['6b7eb0a35a36438491b380be43ca5985']
Muchas gracias abulafia! Al hacer lo que me dices consigo que se ejecute el script y veo como el gráfico aparece un instante y desaparece enseguida. Es decir, se abre y se cierra la ventana del gráfico en un instantte. ¿Eso puede ser problema del paquete gnuplot que tengo instalado?
89995cf619f64de75e90fd2c3a91a48a233ddf7f9f454417d3be9028c3f6e4f7
['6b7fc3d4e6414a70952be0f0e0bc1f38']
Are you working on a local server/localhost? /errors.php will refer to your base url, e.g. http://localhost/errors.php. If you are working with a project directory (e.g. http://localhost/project_dir/), the path to the errors.php-file should be /project_dir/errors.php. With this change, the code works fine on my system.
b100018160a332cf67e05a3a548f3c94d29113205d39f4e09c74ce9a9ff239da
['6b7fc3d4e6414a70952be0f0e0bc1f38']
Your data to the post request is not formatted in the right way. Use {'property1': 'value1', etc}. First try to display the data with PHP, make it more complex when you're sure the connection between jQuery and PHP is working well. Use Firebug or developer tools to see if there errors occur.
97273b4c561d191812456c6ad4f9c125171eac421a3b52f6ad22befb1abb8eb1
['6b88e368b852439caa9251a302588378']
I am trying to implement jwt-authentication using nodejs and React by following https://www.youtube.com/playlist?list=PLvTjg4siRgU0HS3cANo7KZ52Wkud083TL.Here they have used react hooks but I want to implement it in class and without redux.But I don't know how to recieve the cookie in the front end by using axios my current code is Backend:- user.js userRouter.post('/login',passport.authenticate('local',{session : false}),(req,res)=>{ if(req.isAuthenticated()){ const {_id,username,role} = req.user; const token =signToken(_id); res.cookie('access_token',token,{httpOnly:true,sameSite:true}); res.status(200).json({isAuthenticated :true,user : {username,role}}); } }) Frontend:- login.js onSubmit(e){ e.preventDefault(); const user={ username:this.state.username, password:this.state.password } console.log(user); axios.post('http://localhost:5000/user/login',user) .then(res=>{ console.log(res); if(res.data.isAuthenticated){ console.log("authenticated") } }) }
4cbb124f5d68296a2bc9f34eb70e6def2ecf07624c5f9ee7aa1bb185d12d067a
['6b88e368b852439caa9251a302588378']
I think the problem is in the branch. Take the following steps:- Check if there is the creation of .git file after doing git init. Check the branch using git branch and a look if you are at the master branch. Then check the status of the files using git status it will show if any file is changed. Then do git add individual file or git add . as you wish. Then commit the changes. And then push. If git add . fails there is a possibility that the next steps will also fail.And also check git remote -v if your origin branch is at the remote.
6891386799b7b5f25654fdd7ee9c010989c6bce1ee4b83ed40581792ce597387
['6b8925bce7214228994839a0eb1130a5']
I have an iPhone 5s, I have had this phone since 2014. It is pretty beaten up... But it still works. My question is; If I accidentally restore an older back up on my phone, will I be able to go back into iTunes and restore the most recent back up to get all my current information back on my phone?
2404b918e033aebf363dcc3f6f4fb23171905658f2d8fccbfbd8ed5cc676205a
['6b8925bce7214228994839a0eb1130a5']
I have made few edits to my question. It's not definitely XY problem, as I really need to drop one packet (I'm developing something that could be called "testing environment" and testing "what happens when a packet is dropped" is one of testing scenarios. The source and destination devices of stream can be considered as blackbox, the only device, where I can do that is the device with a bridge).
150667b425a2a9ad77b942208e17451c875183f00d2764d923380a03a1eab9bb
['6b9aedfa867d4121815043ddbe51ef4b']
I'm currently making a calculator with HTML, CSS and Javascript, for practice. I found out that the "built in" eval function did the math from a string. But it doesn't work properly. I don't know what the problem is. But when i for example do: 11+11/2 which should be 11. Becomes 16.5 for some reason. I have no idea why. I would really appreciate some help. Here is the code: function revealAnswer(){ var math = document.getElementById("numbersInputted"); math.innerHTML += " = " + eval(math.innerHTML); }
f2ac2bd8b6dd1740e91dd3017060cf531aeb46ebb6b0566ba8495b1e50a07645
['6b9aedfa867d4121815043ddbe51ef4b']
How would I get the value between two floats. I have two drop downs. Each option has its own value (price). And I want to find the price of all of the options added together from the option from the first drop down to the second dropdown. For example I choose “Gold 1”, to “Gold 3”, i want to plus all of the values of each option in between those two options. So “Gold 1” with a value of for example “2€”, “Gold 2” which is in the middle of those two, with the value of “3€” and “Gold 3” with the value off “4€”. With JavaScript. The drop downs and where I want to plus the values are in two different files. I have managed to when they click an option, the value will get stored in localStorage. File 1 HTML: <option value="currgold1">Gold I</option> <option value="currgold2">Gold II</option> <option value="currgold3">Gold III</option> </select> <select class="selectDesired" onchange="listenToDropdownChange2();addDesPriceToLocal()" id="desRank"> <option value="gold1">Gold I</option> <option value="gold2">Gold II</option> <option value="gold3">Gold III</option> </select> File 1 Javascript <script> function addCurrPriceToLocal(){ var currRank_ = document.getElementById("currRank").value; if(currRank_ == "currgold1"){ localStorage.setItem("currRankPrice", "€7.50"); } if(currRank_ == "currgold2"){ localStorage.setItem("currRankPrice", "€7.50"); } if(currRank_ == "currgold3"){ localStorage.setItem("currRankPrice", "€7.90"); } } function addDesPriceToLocal(){ var desRank_ = document.getElementById("desRank").value; if(desRank_ == "gold1"){ localStorage.setItem("desRankPrice", "€7.50"); } if(desRank_ == "gold2"){ localStorage.setItem("desRankPrice", "€7.50"); } if(desRank_ == "gold3"){ localStorage.setItem("desRankPrice", "€7.90"); } } </script> File 2 HTML: <button class="continueToCheckoutFinished" onclick="goToCheckout()" name="checkoutBtnFinished">Checkout</button> File 2 Javascript <script> function goToCheckout(){ var currentRankPriceValue = localStorage.getItem("currRankPrice"); var desiredRankPriceValue = localStorage.getItem("desRankPrice"); var currpriceWithoutSymbols = currentRankPriceValue.replace('€',''); var despriceWithoutSymbols = desiredRankPriceValue.replace('€',''); var currpriceWithoutSymbolsasint = parseFloat(currpriceWithoutSymbols); var despriceWithoutSymbolsasint = parseFloat(despriceWithoutSymbols); var bothPrices = [currpriceWithoutSymbolsasint, despriceWithoutSymbolsasint]; var largestPrice = Math.max.apply(Math, bothPrices); // 306 var smallestPrice = Math.min.apply(Math, bothPrices); // 306 function range(start, end) { return Array(end - start + 1).fill().map((_, idx) => start + idx) } var result = range(smallestPrice, largestPrice); // [9, 10, 11, 12, 13, 14, 15, 16, 17, 18] alert(result); var difference = eval([result].join('+')); var rightPrice = largestPrice + smallestPrice + difference; alert(largestPrice + "-" + smallestPrice + "+" + difference + "=" + rightPrice); window.open("https://www.paypal.me/WAVEBOOSTING/" + rightPrice + "eur", "_self"); } </script>
042bbf8041f549f3948257dc5281a7f4866031c347d192017fb6e957c72ed679
['6b9e356a00574756a31cebbb23e290b4']
Try this: public class flatten { public static int[] flatten1(int[][] a) { int c = 0; for (int i = 0; i < a.length; i++) { for (int j = 0; j < a[i].length; j++) { c++; } } int[] x = new int[c]; int k = 0; for (int i = 0; i < a.length; i++) { for (int j = 0; j < a[i].length; j++) { x[k++] = a[i][j]; } } return x; } public static void main(String[] args) { int[][] test_arr = { { 1, 2, 3 }, { 4, 5, 6 } }; int[] f = flatten.flatten1(test_arr); for (int i = 0; i < f.length; i++) { System.out.print(f[i] + " "); } } }
698ddb94439474c117624142f0b5ff1858800f49bfa7d6e835e50aa601f7fd9d
['6b9e356a00574756a31cebbb23e290b4']
Exceptions here would be overkill IMO. Just using if else clauses would work equally well. Like this: if(input == 1) { // add } else if(input == 2) { // multiply } else { System.out.println("Operation failed. You need to enter 1 or 2."); } Also if you want the program to keep prompting you can just wrap it in a loop. Here is a small example using a boolean sentinel to keep the loop going. This is one of many ways to implement this task. public static void main(String[] args) { System.out.println("Please enter 1 to add or 2 to multiply. "); // ask user to input 1 or 2 Scanner in = new Scanner(System.in); boolean inputNotValid = true; while(inputNotValid){ int input = in.nextInt(); if(input == 1) { inputNotValid = false; //add System.out.println("adding"); } else if(input == 2) { inputNotValid = false; //multiply System.out.println("multiplying"); } else { System.out.println("Operation failed. You need to enter 1 or 2. Try again"); } } }
a78fa6b5f325b6b69a6df19c5f3829b85b8b28137364bf4addb15c6057f3ea0f
['6ba8d015a294442db0195827e804a6e4']
How can I create a filter in Ext JS 4 without sorting feature and menu, need just "search" text field. For example with this code: var gridGroups = Ext.create('Ext.grid.Panel', { columns: [ {dataIndex: 'name', flex: 1}, ], features: [{ ftype: 'filters', encode: true, local: true, filters: [{ type: 'string', dataIndex: 'name' }] }], .... I got this result with unnecessary menu and sorting, but I need only search field So, the search field must be here:
17442010f7f05490227dbb63afc40d383b3c967869d6a4ca5df8deb03c8053cc
['6ba8d015a294442db0195827e804a6e4']
I am using embedded (H2) database with Hibernate and Apache Tomcat, but if I configure relative path in hibernate.cfg.xml like this: <property name="connection.url">jdbc:h2:file:.\MyDataBase</property> this path will be like %Tomcat_directory%\bin\MyDataBase But I need to specify project directory to store data in project resources. How can I do this?
8f1302aca69e8a371f6f81a9fd9bc4f445fd104d353c57e0580a431620efcd12
['6bb1ba06e1df4ecd8d40a8ce020bf3ab']
Lets say I have a word, and I only want to display the first three letters of the word. But the remaining last letters need to show a dash or an asterisk, etc. For example, if we have the word javascript, then the output should display jav-------, pebbles should display as peb----, or instead of python, the output should display pyt---, etc. Would str.replace(old, new) or str.replace(old, new, count) work in this case? If yes, then how? Here is an example I did: >>> p = "kotlin" >>> p = p.replace(p[3:], "-") >>> p 'kot-' >>> The desired output would display kot---, however, although it does show the first 3 letters in the word, kot- only shows one dash in the end. What could be another way to approach this?
2dc5923e6759eca64955e1186787f976708d5639413d61d321040a263fdf6e31
['6bb1ba06e1df4ecd8d40a8ce020bf3ab']
Why isn't this error trap working well? I wanted to make it where if someone types a word or a number over 1, it error traps and repeats the question until you type in the correct corresponding input. Any suggestions?? valid = 0 while valid ==0: x = input('Enter 4 digits for X(0 or 1): ') while len(x)!=4: print('Try Again. Remember 4 digits and only use binary 1 or 0') x = input('Enter 4 digits for X: ') valid = 1 for i in x: if i !='1' and i !='0': print('Try Again. Remember 4 digits and only use binary 1 or 0') valid=0 valid = 0 while valid ==0: y = input('Enter 4 digits for Y(0 or 1): ') while len(y)!=4: print('Try Again. Remember 4 digits and only use binary 1 or 0') y = input('Enter 4 digits for y: ') valid = 1 for i in y: if i !='1' and i !='0': print('Try Again. Remember 4 digits and only use binary 1 or 0') valid=0
5b59c505402228d4f5e498aff4290335cc0b398480c75e711df3f2ed94d506cb
['6bc76554f3c1442a9a1fdbbdafd666d4']
Sure, but by the time the first hash reaches its 5000th iteration, the second hash is in its 4999th, the third hash in its 4998th, etc. In the 5001st iteration, the second hash is in its 5000th iteration and I have its correct output, in addition to the first hash's. Right?
503b80d3158a5a42cd17e000fa69f2d8a6704283523dc37fd7dbcdec90eb10c8
['6bc76554f3c1442a9a1fdbbdafd666d4']
I have created a teaser based on views but don't know how to add a previous/next navigation. I have tried Views Navigation but it is for node only. The one that I am looking for is similar to the previous/next navigation with numbers in the front page. Any help is greatly appreciated.
6433f446bd22be57671ae620aeae10b0c383d0a947451426baf67dcf485b4c38
['6bcd0685af3443f1a0ad2a18a410a5b4']
I had a simmilar leak with animations. In my case I used scaleY.setRepeatCount(1); scaleY.setRepeatMode(ValueAnimator.REVERSE); for setRepeatCount I used INFINITY before, which also never endet the animation, even not after call explicit cancle() or end(). I just changed it to 1 (its not infinit anymore but I can live with it). Just added this answer incase someone run into this as well.
45fec0a61ac2aa6ef9fd6de6db351e2ff29158431cdbf5547d32394c0564391f
['6bcd0685af3443f1a0ad2a18a410a5b4']
I found a line of code: FileOutputStream fileOutputStream = new FileOutputStream(mDownloadedFile, true); The second parameter is append and means: If append is true and the file already exists, it will be appended to; otherwise it will be truncated. In worst case this happend endless because of a retry feature. Normal case is 5 retries of downloading and unzipping. But in worst case this happened endless and the file will be big as hell. Thanks to <PERSON> and his imagination, this was the key to found this line :-)
966904d8b28dc6a5aea5abc29b8be92aba4938dbdd6ca27cc3b9b9929cccc115
['6beeb07f43d7417fa3ab7400e77788ab']
se que no estoy aportando ningún código ni nada de referencia, pero ya que he buscado en internet y no he encontrado una respuesta he decidido preguntar por aquí. Básicamente estoy desarrollando un proyecto muy simple en Android Studio con Java, lo que pasa es que he hecho un layout con cardview y estas cardview tienen un fondo blanco. Al compilarlo en un telefono que tiene activado el Modo Oscuro siempre se ve negro, igual que el fondo o incluso las letras que esten en blanco. He probado en poner el layout en light y muchas otras opciones, pero siempre se ve negro, obviamente en un telefono sin modo oscuro se ve bien. Hay alguna manera de quizas desactivar que siempre cualquier cosa en blanco la deje en blanco si tu lo dejas así ? No se si me explicado.
591e6c30e8e7078a4d725ca460417a838d2f9549ad7563c4aaf58ebfa8f93d8f
['6beeb07f43d7417fa3ab7400e77788ab']
lo que quiero hacer es añadir un label que es un contador, lo que pasa es que quiero centrarlo en el centro del panel independientemente de las medidas que tenga el panel siempre que este este en el centro, he probado en calcular de varias maneras en la posición Y me lo centra bien, pero en la X no, siempre me lo pone a la derecha del todo: //Aquí recibo la posición del raton para ubicarlo en el form// pnl.Location = new Point(xCentro- pnl.Width / 2, yCentro - pnl.Height / 2); pnl.Height = 100; pnl.Width = 100; pnl.BackColor = Color.Yellow; lb.Location = new Point((pnl.Width / 2) - (lb.Width / 2), (pnl.Height / 2) - (lb.Height / 2)); lb.Text = contador.ToString(); pnl.Controls.Add(lb); frmPadre.Controls.Add(pnl); Corrección: Si el tamaño del panel se reduce no se ve más el label, no se que probar más.
e03fb3b225093ba64e9c5db39172b4086ccf0d0d831e76303092e4ec79f73c98
['6c0f577ef6c9467494a51970ab3f9e22']
I've been trying to create a pyramid command in twitch chat for about 2 weeks now however I'm struggling on how to repeat a word after a specific keyword for example if someone types +pyramid (emote) in chat I want to be able to repeat that specific message after they type +pyramid, im not sure how i can start to do this because I've only found out how to replace words when they are defined e.g replace test with yo. Any help would be greatly appreciated.
a4f779b0081cef8d323218c83566dd8747d1a0be3106484251e6231682cb1a55
['6c0f577ef6c9467494a51970ab3f9e22']
So I know js2py is a thing but I'm not entirely sure if you can convert an entire folder? I only know how to use python and being able to convert the language would be extremely helpful for me, I'm trying to make a twitch chat bot however moderation commands and configuration is difficult for me and the destinygg chat bot is insanely good and being able to use it would be amazing. https://github.com/destinygg/chat-bot If this is not possible I understand however its worth a shot to ask how/if I guess :)
13c4ee7d36a5ec6160307fe33bbeeb63c02fb3eda7f655ed6a24aae8fe20c601
['6c1109ae2daa4126abcbeabd740abb4a']
i got the answer, actually i was missing the concept of timeSwapBuff: so here is the corrected code for stopwatch public class StopwatchFragment extends Fragment implements View.OnClickListener { public static StopwatchFragment newInstance() { StopwatchFragment fragment = new StopwatchFragment(); return fragment; } FloatingActionButton stopwatchButton; ImageView stopwatchReplayButton, stopwatchShareButton; TextView timerValue; private long startTime=0L; long timeInMilliSec= 0L; long timeSwapBuff=0L; long updatedTime=0L; int secs, mins, millisec; public SharedPreferences pref; public static SharedPreferences.Editor editor; private Handler customHandler= new Handler(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.stopwatch, container, false); stopwatchButton=(FloatingActionButton) view.findViewById(R.id.stopwatchButton); stopwatchButton.setOnClickListener(this); timerValue=(TextView) view.findViewById(R.id.timerValue); pref=this.getActivity().getSharedPreferences("stopwatch", Context.MODE_PRIVATE); editor=pref.edit(); timerValue.setText("" + pref.getInt("Key1",0) + " : " + String.format("%02d", pref.getInt("Key2",0)) + " : " + String.format("%03d", pref.getInt("Key3",3))); int a=pref.getInt("Key1",0); int b=pref.getInt("Key2",0); int c=pref.getInt("Key3",0); Time t=Time.valueOf(a +":"+b+":"+c); int mm=a*60000; mm=mm+b*1000; mm=mm+c; timeSwapBuff= new Long(mm); stopwatchReplayButton=(ImageView)view.findViewById(R.id.stopwatchReplayButton); stopwatchReplayButton.setOnClickListener(this); stopwatchShareButton=(ImageView)view.findViewById(R.id.stopwatchShareButton); stopwatchShareButton.setOnClickListener(this); return view; } @Override public void onClick(View view) { if(view==stopwatchButton) { if(stopwatchButton.getTag().toString().equals("off")) { stopwatchButton.setTag("on"); stopwatchButton.setImageResource(R.drawable.pause); startTime= SystemClock.uptimeMillis(); customHandler.postDelayed(updateTimerThread,0); stopwatchReplayButton.setVisibility(View.VISIBLE); } else { stopwatchButton.setTag("off"); stopwatchShareButton.setVisibility(View.VISIBLE); stopwatchButton.setImageResource(R.drawable.play); timeSwapBuff+=timeInMilliSec; customHandler.removeCallbacks(updateTimerThread); } } if(view==stopwatchReplayButton) { customHandler.removeCallbacks(updateTimerThread); timerValue.setText("0 : 00 : 00"); stopwatchButton.setTag("off"); stopwatchButton.setImageResource(R.drawable.play); timeInMilliSec= 0L; timeSwapBuff=0L; updatedTime=0L; } if(view==stopwatchShareButton) { String text="My Time is "+mins+" : "+secs+" : "+millisec; Intent i=new Intent(Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(Intent.EXTRA_TEXT,text); startActivity(Intent.createChooser(i,"Share Using")); } } private Runnable updateTimerThread=new Runnable() { @Override public void run() { timeInMilliSec = SystemClock.uptimeMillis() - startTime; updatedTime = timeSwapBuff + timeInMilliSec; secs = (int) (updatedTime / 1000); mins = secs / 60; secs = secs % 60; millisec = (int) (updatedTime % 1000); timerValue.setText("" + mins + " : " + String.format("%02d", secs) + " : " + String.format("%03d", millisec)); editor.putInt("Key1",mins); editor.putInt("Key2",secs); editor.putInt("Key3",millisec); customHandler.postDelayed(this, 0); editor.commit(); } }; }
494e70e713641e6969aa7b9d46ec940f8e837c40b08c5101dacbb2c2e81bfbe2
['6c1109ae2daa4126abcbeabd740abb4a']
i have successfully written and executed code for text to speech. the code is able to speak out the text written in edittext. but now i dont know how to convert it into .wav file and save it into directory. as i am writing this code for api 15+, plz suggest me something. my code: @Override public void onInit(int status) { if (status == TextToSpeech.SUCCESS) { int result = tts.setLanguage(Locale.US); if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) { Log.e("TTS", "This Language is not supported"); } else { // btnSpeak.setEnabled(true); speakOut(); } } else { Log.e("TTS", "Initilization Failed!"); } } private void speakOut() { String text = txtText.getText().toString(); tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); } please some one help me...
1deb47f3eb7cdd621a0afbf1525ec03cba66829adc09c2f92fa0a3aaf12fc814
['6c1c8a7bee58463c9bc2e7e42739a7b3']
I 'm having issues adding in a search widget to a shortlist application. I have included the code below. The search bar shows up, but is not functional. I am needing to have this to where it can search business names that are included within the application. <html> <head> <title>ChahtaPreneur</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <link type="image/ico" rel="shortcut icon" href="//resources.esri.com/favicon.ico"> <link type="image/ico" rel="icon" href="//resources.esri.com/favicon.ico"> <link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css"> <script src="https://js.arcgis.com/3.18/"></script> <link rel="stylesheet" href="https://js.arcgis.com/3.18/esri/css/esri.css"> <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css"> <link rel="stylesheet" type="text/css" href="colorbox/colorbox.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <script type="text/javascript" src="lib/jquery-1.7.2.min.js"></script> <script type="text/javascript" src="lib/common/helper_functions.js"></script> <script type="text/javascript">var djConfig = {parseOnLoad: true};</script> <script type="text/javascript" src="colorbox/jquery.colorbox-min.js"></script> <script type="text/javascript" src="lib/jquery.animate-colors-min.js"></script> <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/"></script> <style> html,body, #mapDiv,.map.container{ padding:0; margin:0; height:100%; } #search { display: block; position: absolute; z-index: 2; top: 20px; left: 720px; } </style> <script src="https://js.arcgis.com/3.18/"></script> <!-- To correctly reference your Shortlist in search engine: - create and fill out extensively an ArcGIS Online item that link to your final application - edit the following four tags as well as the title tag above on line 4 --> <meta name="description" content="This story map was created with the Story Map Shortlist application in ArcGIS Online."> <!-- Facebook sharing --> <meta property="og:type" content="article"/> <meta property="og:title" content="Story Map Shortlist"/> <meta property="og:description" content="This story map was created with the Story Map Shortlist application in ArcGIS Online."/> <meta property="og:image" content="resources/common/icons/esri-globe.png"/> <!-- This application is released under the Apache License V2.0 by <PERSON> http://www.esri.com/ Checkout the project repository on GitHub to access source code, latest revision, developer documentation, FAQ and tips https://github.com/Esri/shortlist-storytelling-template-js --> <script type="text/javascript"> //------------------------------------------------------------------------------------------- // Application configuration (ignored on ArcGIS Online, Portal and during development) //------------------------------------------------------------------------------------------- var configOptions = { // Enter an application ID created through the Shortlist builder appid: "f8c9b5d9a2c64703bb72910f46f59d7c", // Optionally to secure Shortlist's access, use an OAuth application ID (example: 6gyOg377fLUhUk6f) // User will need to sign-in to access the viewer even if your application is public oAuthAppId: "", // Optionally to be able to use the appid URL parameter, configure here the list of application author // whose application are allowed to be viewed by this Shortlist deployment // This is the Portal username of the Shortlist owner (e.g. ["user1"], ["user1", "user2"]) authorizedOwners: ["*"] }; // Optionally sharing and proxy URLs can be configured in app/config.js. This is only required // when the webmap is not hosted on ArcGIS Online or a Portal for ArcGIS instance and the application isn't deployed as /home/Shortlist/ or /apps/Shortlist/. // Optionally Bing Maps key, Geometry and Geocode service's URLs can be configured in app/config.js. This is only required // if the Organization or Portal for ArcGIS instance default configuration has to be overwritten. </script> <script type="text/javascript"> dojo.require("dijit.dijit"); dojo.require("dijit.layout.BorderContainer"); dojo.require("dijit.layout.ContentPane"); dojo.require("esri.map"); dojo.require("esri.arcgis.utils"); dojo.require("esri.dijit.Geocoder"); /****************************************************** ******************** config section ****************** *******************************************************/ var WEBMAP_ID = "6b3d1da24e5841f1b8d47de63b7be7a4"; var BOOKMARKS_ALIAS = "Zoom"; var COLOR_ORDER = "green,red,blue,purple"; // will only use as many colors as you have content (point) layers var BINGMAPS_KEY = ""; /****************************************************** ******************** app variables ******************** *******************************************************/ var _contentLayers = []; var _isMobile = isMobile(); var _map; var _bookmarks; var _layerCurrent; var _selected; var _initExtent; var _dojoReady = false; var _jqueryReady = false; var geocoder; var locatorUrl = "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/"; /****************************************************** ************************* init ************************ *******************************************************/ dojo.addOnLoad(function() {_dojoReady = true;init()}); jQuery(document).ready(function() {_jqueryReady = true;init()}); /* init comes in two parts because of async call to createMap. */ function init() { if (!_jqueryReady) return; if (!_dojoReady) return; if (getParameterByName("webmap") != "") { WEBMAP_ID = getParameterByName("webmap"); } if (getParameterByName("bookmarks_alias") != "") { BOOKMARKS_ALIAS = getParameterByName("bookmarks_alias"); } if (getParameterByName("color_order") != "") { COLOR_ORDER = getParameterByName("color_order") } $("#bookmarksTogText").html(BOOKMARKS_ALIAS+' &#x25BC;'); $(this).resize(handleWindowResize); $("#zoomIn").click(function(e) { _map.setLevel(_map.getLevel()+1); }); $("#zoomOut").click(function(e) { _map.setLevel(_map.getLevel()-1); }); $("#zoomExtent").click(function(e) { _map.setExtent(_initExtent); }); $(document).bind('cbox_complete', function(){ $(".details .rightDiv").height($(".details").height() - 65); }); $("#bookmarksToggle").click(function(){ if ($("#bookmarksDiv").css('display')=='none'){ $("#bookmarksTogText").html(BOOKMARKS_ALIAS+' &#x25B2;'); } else{ $("#bookmarksTogText").html(BOOKMARKS_ALIAS+' &#x25BC;'); } $("#bookmarksDiv").slideToggle(); }); var mapDeferred = esri.arcgis.utils.createMap(WEBMAP_ID, "map", { mapOptions: { slider: false, wrapAround180:false }, ignorePopups: true, bingMapsKey: BINGMAPS_KEY }); mapDeferred.addCallback(function(response) { document.title = response.itemInfo.item.title; $("#title").html(response.itemInfo.item.title); $("#subtitle").html(response.itemInfo.item.snippet); _map = response.map; //resize the map when the browser resizes dojo.connect(dijit.byId('map'), 'resize', _map,_map.resize); dojo.connect(_map, 'onExtentChange', refreshList); // click action on the map where there's no graphic // causes a deselect. dojo.connect(_map, 'onClick', function(event){ if (event.graphic == null) { unselect(); } }); _bookmarks = response.itemInfo.itemData.bookmarks; if (_bookmarks) { loadBookmarks(); $("#bookmarksCon").show(); } var layers = response.itemInfo.itemData.operationalLayers; if(_map.loaded){ initMap(layers); } else { dojo.connect(_map,"onLoad",function(){ initMap(layers); }); } }); mapDeferred.addErrback(function(error) { console.log("Map creation failed: ", dojo.toJson(error)); }); } function initMap(layers) { var supportLayers = []; var pointLayers = [""]; $.each(layers,function(index,value){ if (value.url == null) { if (value.featureCollection.layers[0].featureSet.geometryType == "esriGeometryPoint") { pointLayers.push(value); } else { supportLayers.push(value); } } else { // if the layer has an url property (meaning that it comes from a service), just // keep going...it will remain in the map, but won't be query-able. } }); _initExtent = _map.extent; var supportLayer; $.each(supportLayers,function(index,value) { supportLayer = findLayer(_map,value.title); if (supportLayer == null) return; $.each(supportLayer.graphics,function(index,value) { value.attributes.getValueCI = getValueCI; // assign extra method to handle case sensitivity }); dojo.connect(supportLayer, "onMouseOver", baselayer_onMouseOver); dojo.connect(supportLayer, "onMouseOut", baselayer_onMouseOut); dojo.connect(supportLayer, "onClick", baselayer_onClick); }); if (COLOR_ORDER.split(",").length < pointLayers.length) { // you have supplied fewer colors than point layers and // therefore have lost your sorting privileges... colorschemes = COLOR_SCHEMES; } else { // sort the colors var colorschemes = getSortedColorSchemes(); // burn off any extra colors, if you have more colors // than points. while (pointLayers.length < colorschemes.length) { colorschemes.shift() }; } var contentLayer; $.each(pointLayers,function(index,value) { _map.removeLayer(findLayer(_map,value.title)); if (index <= 4) { // maximum of 4 point layers. $.each(value.featureCollection.layers[0].featureSet.features,function(index,value) { value.attributes.getValueCI = getValueCI; // assign extra method to handle case sensitivity }); contentLayer = buildLayer( value.featureCollection.layers[0].featureSet.features.sort(SortByID), colorschemes[index].iconDir, colorschemes[index].iconPrefix ); contentLayer.color = colorschemes[index].color; contentLayer.title = value.title; dojo.connect(contentLayer, "onMouseOver", layer_onMouseOver); dojo.connect(contentLayer, "onMouseOut", layer_onMouseOut); dojo.connect(contentLayer, "onClick", layer_onClick); _map.addLayer(contentLayer); _contentLayers.push(contentLayer); } }); _contentLayers.reverse(); $.each(_contentLayers,function(index,value){ $("#tabs").append('<div class="tab" onclick="activateLayer(_contentLayers['+index+'])">'+value.title+'</div>'); }); activateLayer(_contentLayers[0]); dojo.connect(_map.infoWindow,"onHide",infoWindow_onHide); handleWindowResize(); $("#zoomToggle").css("visibility","visible"); // Solomon Additions // add a graphics layer for geocoding results _map.addLayer(new esri.layers.GraphicsLayer({ id: "results" })); var myGeocoders = [{ url: locatorUrl, name: "Single_Line" }]; // create the geocoder geocoder = new esri.dijit.Geocoder({ autoComplete : true, autoNavigate: true, localSearchOptions : { minScale : 3, distance : 4000}, maxLocations : 20, arcgisGeocoder: false, geocoders:myGeocoders, value:'Search by Name', map : _map }, "search"); geocoder.startup(); geocoder.focus(); var symbol = new esri.symbol.PictureMarkerSymbol({ "angle":0, "xoffset":0, "yoffset":10, "type":"esriPMS", "url":"http://static.arcgis.com/images/Symbols/Shapes/BluePin1LargeB.png", "contentType":"image/png", "width":24, "height":24 }); var template = new esri.InfoTemplate("${NAME}", "${*}"); dojo.connect(geocoder, "onFindResults", function(response) { //STEVE CHANGES //Use first match //var name = response.results[0].name; //Match name with locations layer and selected that index //for(i in _locations){ //if(name === _locations[i].attributes.getName()){ //preSelection() //_selected = _locations[i]; //postSelection(); //} //} //STEVE CHANGES END console.log("find results: ", response); var l = _map.getLayer("shortlistlayer"); l.clear(); _map.infoWindow.hide(); dojo.forEach(response.results, function(r) { r.feature.attributes.NAME = r.NAME; r.feature.setSymbol(symbol); r.feature.setInfoTemplate(template); l.add(r.feature); }); }); // solomon Addition Ends } /****************************************************** ******************** event handlers ******************* *******************************************************/ function tile_onMouseOver(e) { $(this).stop().animate({'background-color' : COLOR_FULL}); } function tile_onMouseOut(e) { if (_selected != null) { // does this tile represent the selected graphic? var id = parseInt($(this).attr("id").substring(4)); if (_selected.attributes.getValueCI("Number") == id) { return; } } $(this).stop().animate({'background-color' : COLOR_DIM}); } function tile_onClick(e) { // turn off the last selected tile... if (_selected != null) { var tile = $.grep($("ul.tilelist li"),function(n,i){return n.id == "item"+_selected.attributes.getValueCI("Number")})[0]; if ($(tile).attr("id") != $(this).attr("id")) $(tile).stop().animate({'background-color' : COLOR_DIM}); } $(this).stop().animate({'background-color' : COLOR_FULL}); var id= $(this).attr("id").substring(4); _selected = $.grep(_layerCurrent.graphics,function(n,i){return n.attributes.getValueCI("Number") == id})[0]; postSelection(); } function infoWindow_onHide(event) { unselect(); } function baselayer_onMouseOver(event) { if (_isMobile) return; _map.setMapCursor("pointer"); var graphic = event.graphic; $("#hoverInfo").html(graphic.attributes.getValueCI("Title")); var pt = event.screenPoint; hoverInfoPos(pt.x,pt.y); } function baselayer_onMouseOut(event) { if (_isMobile) return; _map.setMapCursor("default"); $("#hoverInfo").hide(); } function baselayer_onClick(event) { var feature = event.graphic; _map.infoWindow.setTitle(event.graphic.attributes.getValueCI("NAME")); _map.infoWindow.setContent(event.graphic.attributes.getValueCI("CAPTION")+"<p><span class='infoWindowLink'>Details >></span></p>"); _map.infoWindow.show(event.mapPoint); $(".infoWindowLink").click(function(e) { showDetails(feature); }); $("#hoverInfo").hide(); } function layer_onClick(event) { var tile; if (_selected != null) { tile = $.grep($("ul.tilelist li"),function(n,i){return n.id == "item"+_selected.attributes.getValueCI("Number")})[0] $(tile).stop().animate({'background-color' : COLOR_DIM}); } _selected = event.graphic; tile = $.grep($("ul.tilelist li"),function(n,i){return n.id == "item"+_selected.attributes.getValueCI("Number")})[0] $(tile).stop().animate({'background-color' : COLOR_FULL}); postSelection(); } function layer_onMouseOver(event) { if (_isMobile) return; _map.setMapCursor("pointer"); var graphic = event.graphic; if (graphic == _selected) return; graphic.setSymbol(graphic.symbol.setHeight(30).setWidth(24)); $("#hoverInfo").html(graphic.attributes.getValueCI("NAME")); var pt = _map.toScreen(graphic.geometry); hoverInfoPos(pt.x,pt.y); } function layer_onMouseOut(event) { if (_isMobile) return; _map.setMapCursor("default"); var graphic = event.graphic; graphic.setSymbol(graphic.symbol.setHeight(28).setWidth(22)); $("#hoverInfo").hide(); } /****************************************************** ****************** other functions ******************** *******************************************************/ function unselect() { if (_selected != null) { tile = $.grep($("ul.tilelist li"),function(n,i){return n.id == "item"+_selected.attributes.getValueCI("Number")})[0] $(tile).stop().animate({'background-color' : COLOR_DIM}); } _selected = null; postSelection(); } // sort items by numeric ID function SortByID(a, b){ var aID = a.attributes.getValueCI("Number"); var bID = b.attributes.getValueCI("Number"); return ((aID < bID) ? -1 : ((aID > bID) ? 1 : 0)); } function loadBookmarks() { $.each(_bookmarks,function(index,value){$("#bookmarksDiv").append("<p><a>"+value.name+"</a></p>")}); $("#bookmarksDiv a").click(function(e) { var name = $(this).html(); var extent = new esri.geometry.Extent($.grep(_bookmarks,function(n,i){return n.name == name})[0].extent); _map.setExtent(extent); $("#bookmarksTogText").html(BOOKMARKS_ALIAS+' &#x25BC;'); $("#bookmarksDiv").slideToggle(); }); } function activateLayer(layer) { _selected = null; postSelection(); _layerCurrent = layer; var tab = $.grep($(".tab"),function(n,i){return $(n).html() == _layerCurrent.title})[0]; $(".tab").removeClass("tab-selected"); $(tab).addClass("tab-selected"); $.each(_contentLayers,function(index,value){ value.setVisibility(value == _layerCurrent); }); $("#myList").empty(); var display; var tile; var img; var footer; var num; var title; $.each(_layerCurrent.graphics,function(index,value){ if (_map.extent.contains(value.geometry)) { display = "visible" } else { display = "none"; } tile = $('<li id="item'+value.attributes.getValueCI("Number")+'" style="display:'+display+'">'); img = $('<img src="'+value.attributes.getValueCI("THUMB_URL")+'">'); footer = $('<div class="footer"></div>'); num = $('<div class="num" style="background-color:'+_layerCurrent.color+'">'+value.attributes.getValueCI("Number")+'</div>'); title = $('<div class="blurb">'+value.attributes.getValueCI("Name")+'</div>'); $(footer).append(num); $(footer).append(title); $(tile).append(img); $(tile).append(footer); $("#myList").append(tile); }); // event handlers have to be re-assigned every time you load the list... $("ul.tilelist li").mouseover(tile_onMouseOver); $("ul.tilelist li").mouseout(tile_onMouseOut); $("ul.tilelist li").click(tile_onClick); $("ul.tilelist").animate({ scrollTop: 0 }, { duration: 200 } ); } function refreshList() { var tile; $.each(_layerCurrent.graphics,function(index,value){ //find the corresponding tile tile = $.grep($("ul.tilelist li"),function(n,i){return n.id == "item"+value.attributes.getValueCI("Number")})[0]; if (_map.extent.contains(value.geometry)) { if ($(tile).css("display") == "none") $(tile).stop().fadeIn(); } else { if ($(tile).css("display") != "none") $(tile).stop().fadeOut(1000); } }); } function buildLayer(arr,iconDir,root) { var layer = new esri.layers.GraphicsLayer(); var pt; var sym; $.each(arr,function(index,value){ pt = new esri.geometry.Point(value.geometry.x,value.geometry.y,value.geometry.spatialReference); sym = new esri.symbol.PictureMarkerSymbol("images/icons/"+iconDir+"/"+root+value.attributes.getValueCI("Number")+".png",22,28); layer.add(new esri.Graphic(pt,sym,value.attributes)); }); return layer; } function getValueCI(field) { var found; $.each(this,function(index,value){ if (index.toUpperCase() == field.toUpperCase()) { found = index; return false; } }); return this[found]; } function handleWindowResize() { var heightDoc = getViewportDimensions()[1]; $("#mainWindow").height(heightDoc - ($("#header").height())); dijit.byId("mainWindow").layout(); $("#paneLeft").height($("#mainWindow").height() - 35); $(".tilelist").height($("#paneLeft").height() - 20); $("#map").height($("#mainWindow").height() - 35);
fb9d1e3a00801ddc83a4ca13dfc2f5374c4774113d2d83a85bc1885f99ff367d
['6c1c8a7bee58463c9bc2e7e42739a7b3']
Does anyone know of a way of possibly making a side panel in a webapp for ArcGIS Online that would allow images to be displayed that are either attached to point location data, or have a URL in the table. I would like to images to appear based on the current extent of the map and disappear when no longer in view on the map.
15324d7750210fe2448e02106dd11b2e1af414c383b6238858b382aec947131b
['6c1c8bd2e1c141e5a6d90ad461b4c5b5']
Yeah, what you're describing would be just a virtualized block storage device. That's all a generic Virtual Hard Disk (VHD) is, regardless of format Microsoft VHD[X], VMDK, VDI, et al. But yeah, what I want to do is decouple the idea of a VM running on a hypervisor with the underlying block storage device containing a filesystem(s) that contains the operating system.
5576a89e6b34bc7e76d6fa052a842907cbc0cd6dc21ddbfe05a1f6d2e32ad7ea
['6c1c8bd2e1c141e5a6d90ad461b4c5b5']
I don't have a supervisor right now, but I have found Gradiner's Handbook of Stochastic Method in our library and read part of it. I have read review of some stochastic processes textbook on Amazon, Goodreads and some other forum. After reading these, I was not satisfied with the information I found and didn't know which one fit my situation best, so I post a question here.
2de91618ba265d4b262a4643982acaa0bb7c908f50739c9a923923d4b22f8936
['6c20c3f9bdb64292b47ab3de17a131a6']
For reference, a beeswarm plot with variable radius looks like this: <PERSON> created an example of a beeswarm plot with d3 version 5. However, the radius of all the data points must be the same: Is it easy to make a beeswarm plot with variable point radius in d3 v5? I did this years ago in d3 version 3 and curious if there's any updated examples.
ef1990411c21912fdf30eefdd68b3a8d98b59898eb17520c3d342979dab07aab
['6c20c3f9bdb64292b47ab3de17a131a6']
I'd like to make an Archimedean spiral in SVG. I created a spiral with four quadratic bezier points, but I'm not sure where I should put the control points for each to get a perfect Archimedean spiral: <path class="spiral" d="M100 50 C 100 116 12.5 99.5 12.5 50 C 12.5 0.5 75 9 75 50 C 75 83 37.5 74 37.5 50 C 37.5 38 50 42 50 50" stroke="black" stroke-width="1" fill="none">
cfb57877badda486d88bc1813daa8f7cd2990eb5d15c216667e2d7fe011153db
['6c3e95662f1744098ee9ba439f0de69c']
Consider a countably infinite vector, where each component is a rational number between 0 and 1 (inclusive). We say that an ordering $\preceq$ is Pareto if it obeys the following rule: If there is some index $i$ such that $x_i\leq y_i$, and for all other $j\not = i$, $x_j = y_j$, then $x\preceq y$. I was wondering if any Pareto ordering's are computable in this set that I mentioned. I suspect the answer is no, but someone told me proof which I don't understand: One confusion I have is that this seems to prove that the rational numbers themselves cannot be computably ordered, a contradiction. What am I misunderstanding?
4301589054fbd7d10a343adbc7f23f49f467ccc9feac6438910457fc42c68749
['6c3e95662f1744098ee9ba439f0de69c']
As you allude to in your question, it might be more useful to consider the equivalence classes of your set, rather than the set itself. $S/f$ has a lot of nice properties: it's totally ordered, etc. By the way, you tagged this as lattice-orders; if this was intentional, you can prove the following little theorem: Theorem: if $S_i$ has more than one element, then $S_{i +1}$ must have only one element. To see this, just note that $S_i$ must have not just an upper bound, but a least upper bound.
0a312883102d51d292acbf32da6180eaf5ccaeb23a09162ea2c1663522f1fbc0
['6c4f56beff7144edbe95f23af756696e']
Yes, your plugin is awesome. Just what you need to improve and finalize your plugin is that in newer WordPress versions, there are two different tables that contain user data. They are wp_user and wp_usermeta. And in the plugin, it is provided only one table to authenticate. So if this feature goes right, definitely your plugin is 100% successful. What else, is that there is a bug. As there is only one table to authenticate, so I couldn't authenticate user roles and sync them. This means when I enable external login, the time I logged out, and login the next time, I am of subscriber role, that I have specified if no roles matches. So i loosed my adminship too. Kindly help and understand.
4a7e1c57118be4765e0e87f6a8f37e5908c1ed6402f220e6066152b894c93c8e
['6c4f56beff7144edbe95f23af756696e']
Thank you <PERSON> I edited the question by adding the link where I got the template. In the .bib file if I add the above mentioned reference where there are no volume, number and pages information, in the reference list it will be added without the year as I mentioned before
5f9bf5f66d06acde007ca105124b9755a05cf9c1bc6542eb62f81c87e9f791be
['6c541dd291574e5da6d37d0680c2bd5a']
Using VMWare ESXi 6.7.0 with Essentials licensing, I would like to backup my VMs to a plugged External HD. Previously we did it with Veeam because we were using a Windows Server, but now with their Hypervisor we couldn't find some way to do it. What I've already seen: Veeam - Couldn't find an apropriate solution for what we need, is it possible to install it or use remotely without paid agent solutions? OVF Export - From what I did understand by reading this feature would use the network to export the VM. That´s not exactly what I'm looking for (if it's this) ghettoVCB.sh - I'm not sure if this one works with this version, from what I did read it works with version 5 and 4. Is there any other way to achieve this using free alternatives to communicate with ESXi 6.7? Thank you very much!
3b2bfe60dcb85685f10158fc090729d601785c595702a41cffa40d973051c4fe
['6c541dd291574e5da6d37d0680c2bd5a']
Is it possible credentials from Azure AD to configure a Service on Windows? This account would also access a SQL Server instance on another machine and run commands. Assuming there's no on-premises Active Directory installed on this environment, but there should be clients consuming this application. Is this strange scenario viable?
f91aec87634dadde9c65667f5fa9ae40b775cd978119c9bd69d63e8cf97a6eb2
['6c59b492b2cd42369706857be5ba7a11']
I'm looking at new OkHttpClient.Builder() to see whether there's a setting that would allow me to do 'raw' GETs of resources and then get the compressed bytes for that resource in the response. As far as I can see OkHttp transparently ungzips payloads. I can't see a way of initializing OkHttpClient to not do that. I've tried googling for "gzip OkHttpClient.Builder" and I get a bunch of unrelated inexact matches. I'm missing something obvious. Obviously :-(
55407b3cb4e0cc09a895067fcd9641feb18c1ddb5bab79354f9d0fd1a97fe22c
['6c59b492b2cd42369706857be5ba7a11']
I have a clone. I want to reduce the history on it, without cloning from scratch with a reduced depth. Worked example: $ git clone <EMAIL_ADDRESS>:apache/spark.git # ... $ cd spark/ $ du -hs .git 193M .git OK, so that's not so but, but it'll serve for this discussion. If I try gc it gets smaller: $ git gc --aggressive Counting objects: 380616, done. Delta compression using up to 4 threads. Compressing objects: 100% (278136/278136), done. Writing objects: 100% (380616/380616), done. Total 380616 (delta 182748), reused 192702 (delta 0) Checking connectivity: 380616, done. $ du -hs .git 108M .git Still, pretty big though (git pull suggests that it's still push/pullable to the remote). How about repack? $ git repack -a -d --depth=5 Counting objects: 380616, done. Delta compression using up to 4 threads. Compressing objects: 100% (95388/95388), done. Writing objects: 100% (380616/380616), done. Total 380616 (delta 182748), reused 380616 (delta 182748) Pauls-MBA:spark paul$ du -hs .git 108M .git Yup, didn't get any smaller. --depth for repack isn't the same for clone: $ git clone --depth 1 <EMAIL_ADDRESS><PHONE_NUMBER>), done. Writing objects: 100% (380616/380616), done. Total 380616 (delta 182748), reused 380616 (delta 182748) Pauls-MBA:spark paul$ du -hs .git 108M .git Yup, didn't get any smaller. --depth for repack isn't the same for clone: $ git clone --depth 1 git@github.com:apache/spark.git Cloning into 'spark'... remote: Counting objects: 8520, done. remote: Compressing objects: 100% (6611/6611), done. remote: Total 8520 (delta 1448), reused 5101 (delta 710), pack-reused 0 Receiving objects: 100% (8520/8520), 14.82 MiB | 3.63 MiB/s, done. Resolving deltas: 100% (1448/1448), done. Checking connectivity... done. Checking out files: 100% <PHONE_NUMBER>), done. $ cd spark $ du -hs .git 17M .git Git pull says it's still in step with the remote, which surprises nobody. OK - so how to change an existing clone to a shallow clone, without nixing it and checking it out afresh?
7d9328cbd6415951187ea19be9e520f1c6882171f966e43c4a8c66b9293fa593
['6c5e4058deb942afa69842309cf78377']
Okay, I figured it out myself. I had already created a WCF Client (Service Reference) that worked, and by looking closely at the generated code, I figured out what is happening. It has to do with way WCF wrappes all classes used in the DECLARATION of Webservice methods (so the classes used in properties of the method-mentioned-classes are not wrapped). In my case, the body of the ZAKLk01 class get wrapped with XMLElement tags, using the parametername as XMLElement-name. To get rid of this behaviour I am now using wrapper classes for my generated proxy-classes ZAKLk01 and Bv03Bericht, just like the generated classes do of my Service References proxy classes in my new WCF Client. These wrapper classes are decorated with MessageContractAttributes. To give an example of one of those wrapper classes: [MessageContract(IsWrapped = false)] public partial class zakLk01Request { [MessageBodyMember(Namespace = Constants.NamespaceStufZKN, Order = 0)] public ZAKLk01 zakLk01; public zakLk01Request() { } public zakLk01Request(ZAKLk01 zakLk01) { this.zakLk01 = zakLk01; } } My Interface method now looks like this: [OperationContract(Action = Constants.NamespaceStufZKN + "/zakLk01", ReplyAction = Constants.NamespaceStufZKN + "/Bv03Bericht")] [FaultContract(typeof(Fo03Bericht), Namespace = Constants.NamespaceStuf)] zakLk01Response zakLk01(zakLk01Request zakLk01); Much cleaner without the XMLElement tags, which function (generate correct xml) have now been replaced by the wrapper classes. The reason I could receive non-wrapped xml, was that my custom messageinspector contained some code, meant to accept non-wrapped xml messages without having to add MessageContract tags to all existing classes (or create lots of wrapper classes) (googled it somewhere), which it did just fine. Code snippet: MessageDescription.Body.WrapperName = null; But receiving wrapped messages which were send by my (first) WCF Client which still wrapped the classes didn't work, off course... What I still don't understand is how those Action attributes work: if I don't supply them, my generated wsdl does not contain any method. Well, not important for now, since I can finally move on, and will tinker with the Action attributes some other time.
82c1d576a84ee246559b03438e93e78bec9ac6e72bbcb7f0b82de0158cdeb68c
['6c5e4058deb942afa69842309cf78377']
I've recently tried to add a 2nd PC to my router, so that i can use RDP on this PC too. The 1st one already works, as it's using the standard methods (default RDP port 3389, etc.) So, currently the 1st PC is open for any connection, i can just connect to it with the external IP address. No problem. The second PC however; I have added to my router listening to port 3390 I have changed the listening port to 3390 in HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\WinStations\RDP-Tcp\PortNumber I have checked if my Windows Firewall or AVG Firewall is blocking or disabling port 3390 I have tried to connect through EXTERNAL_IP:3390 with RDP I have rebooted my router, and PC multiple times to double check. And still, i can't get this thing working. Any idea's? OS: Windows 8.1 Router: Cisco EPC3928AD Thanks in advance, BBQ.
ccd58ff10dfbfeca146010559e29345a2f0d397ca43c010e6e4a6f068282936e
['6c715373a6ea447baa81d41efc2da27e']
I think that the Combobox data binding process also reduce the performance. If it possible for you, you should use other control instead of the Combobox to handle a big data. I assume that your users should know which madicine they want to select, so they could put a part of medicine name in search box. This just a choice, you may use TextBox (names txtMedicines in my sample code) with AutoComplete to search binding data when user enter some word to search in the list. This is a sample code private void InitializeMedicinesAutoComplete() { var searchMed = Lookup.Medicines .Where(d => d.DosageForm.Equals(cmbType.SelectedValue.ToString())).ToList(); var source = new AutoCompleteStringCollection(); foreach (var med in searchMed) { // **DisplayMemberText mean any field that you want to display in searching list source.Add(med.DisplayMemberText); } txtMedicines.AutoCompleteMode = AutoCompleteMode.Suggest; txtMedicines.AutoCompleteSource = AutoCompleteSource.CustomSource; txtMedicines.AutoCompleteCustomSource = source; } private void cmbType_SelectedIndexChanged(object sender, EventArgs e) { InitializeMedicinesAutoComplete(); } I hope this will help.
de74b58b8f090cc9b9c39ead154a1e64c01b04e045956cb4ff33655458f8b5ed
['6c715373a6ea447baa81d41efc2da27e']
To bind xml data with GridView, I suggest you to use XmlDataSource and modify your xml file a little bit. This is modified sample xml file named "XMLFile.xml", added <data> as root element. <?xml version="1.0" encoding="utf-8" ?> <data> <PublisherProperty> <Name>Channel</Name> <Value>943</Value> <PublisherID>PUBLISHER</PublisherID> </PublisherProperty> <PublisherProperty> <Name>Queue</Name> <Value>q123</Value> <PublisherID>PUBLISHER</PublisherID> </PublisherProperty> </data> And this is aspx code to get the data <asp:XmlDataSource ID="xmlDataSource" runat="server" DataFile="XMLFile.xml" XPath="data/PublisherProperty"></asp:XmlDataSource> <asp:GridView ID="GridView1" runat="server" DataSourceID="xmlDataSource" AutoGenerateColumns="false"> <Columns> <asp:TemplateField HeaderText="Name"> <ItemTemplate><asp:Label runat="server" ID="lblName" Text='<%# XPath("Name") %>'></asp:Label></ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Value"> <ItemTemplate><asp:Label runat="server" ID="lblValue" Text='<%# XPath("Value") %>'></asp:Label></ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> Note that you have to set a correct xml path such XPath="data/PublisherProperty" when you want to query against element.
8ed08eb9ae6e4e67503c107e0b4fac7be951f081bac5d9bc915710024e654ba1
['6c777cda274246839163a3d1bd7b764b']
If you want to fix your windows 10 OS, follow This Answer. Also, you can do this above, and repair the partition. after that, open the Command prompt and type powercfg -h off. it will delete the hiberfile.sys and won't hibernate. probably it can't be fixed, because it's hibernated. Edit: i already tried this answer on my broken WIndows 7 OS (UNMOUTABLE_BOOT_VOLUME) and it fixed it. i don't know how it will work if the OS is hibernated.
1737c6c8eabeb429584bf42a128ee07cba5592a1121cc9444ab2d95c97f328b2
['6c777cda274246839163a3d1bd7b764b']
you can't resize/move the root partition when booted from the partition itself. if you see a key icon on the Linux partition, boot from the Ubuntu LiveCD and resize the root partition. also can you tell what partition is the root one? i can't see "Mount Point" on the screenshot.
fcc6ddd2a19abc5bb79405eecbde356fc1d30b1be25c2c5babd96b80c66d9fc9
['6c7a0c5f0add4ce3a92876ef7744e9f0']
I am using Angular and TypeScript. I have used try catch construct for error handling in case of API call. If any error occurs in try block it is simply NOT going to catch block. App terminates there only. I have tried using throw as well. Here is a sample code snippet, try { this.api.getAPI(Id).subscribe( // this.api is my api service and getAPI is present there (data: any) => { if (data == null) { throw 'Empty response'; } }, (error: HttpErrorResponse) => { console.log(error); }; } catch(e) { console.log(e); } in some cases 'data' from API returns 'null', but throw is not going to catch block ALSO, tried without throw, it gives null error for 'data' ... in that case also not going to catch block.
30072b2a9d273f16f7d218d467603d2027106fe9363656107c057f3e46dfd117
['6c7a0c5f0add4ce3a92876ef7744e9f0']
I am using VS 2010 and I want to use MVC 3 Architecture since i need Razor C# and it is not possible in my Visual studio. Currently it is availing me only MVC 2 so C# Razor is not possible So how do i upgrade my VS so as to use MVC 3 with Razor C# ?
954b5207c0fda037a5786a4b3cd485e06be9b0c5cfd7e4a793494283757b9f9f
['6c7b00d1dcea456dad9e97513f728087']
This is the code which opens gallery and pick an image to crop it. The change I need is I don't want to open the gallery to pick image. I have already image in my imageview. How can I pass uri of image with intent to use direct crop feature of gallery. what modification I need to do this in below code. Thanks! Intent intent = new Intent(); // call android default gallery intent.setType("image/*"); intent.setAction(Intent.ACTION_GET_CONTENT); // ******** code for crop image intent.putExtra("crop", "true"); intent.putExtra("aspectX", 0); intent.putExtra("aspectY", 0); intent.putExtra("outputX", 200); intent.putExtra("outputY", 150); I have modified it with Intent intent = new Intent("com.android.camera.action.CROP"); intent.setData(edtImgUri); but it is also not working.
a32a65189ba30e48b4b0c909f26388889aa6aaee3d4cfaf5205949beb06c0201
['6c7b00d1dcea456dad9e97513f728087']
This is the code which I use to change contrast and brightness of image. I can increase and decrease brightness of image with that because it takes -255 to 255 value for brightness and I can increase contrast with 0 to 10 value of it but I can't decrease contrast as in this code it does not take -ve value for contrast. so how can I decrease contrast? /** * * @param bmp input bitmap * @param contrast 0..10 1 is default * @param brightness -255..255 0 is default * @return new bitmap */ public static Bitmap changeBitmapContrastBrightness(Bitmap bmp, float contrast, float brightness) { ColorMatrix cm = new ColorMatrix(new float[] { contrast, 0, 0, 0, brightness, 0, contrast, 0, 0, brightness, 0, 0, contrast, 0, brightness, 0, 0, 0, 1, 0 }); Bitmap ret = Bitmap.createBitmap(bmp.getWidth(), bmp.getHeight(), bmp.getConfig()); Canvas canvas = new Canvas(ret); Paint paint = new Paint(); paint.setColorFilter(new ColorMatrixColorFilter(cm)); canvas.drawBitmap(bmp, 0, 0, paint); return ret; }
c9e94fa213b76a485b5a6452980a41e818a61c1665b7d0caa30d36f95d0a424e
['6c9369f469ae48ac956d1baf6fcb13ab']
You could use this to Run WWW on the main thread after your async stuff is done. Or you could use webclient in the system.net to download on a background thread. Dont forget you can yield the download with WWW on the main thread to make it not lockup your frames while downloading. webclient example WebClient webClient = new WebClient(); webClient.DownloadProgressChanged += OnChange; webClient.DownloadFileCompleted += OnCompleted; webClient.DownloadFileAsync(new Uri(download), fileAndPath);
3df4ab71484ac19b0ec576ae104c9f8b484606aa2b00ae5b197f7073d830fa9d
['6c9369f469ae48ac956d1baf6fcb13ab']
A quick google search found this witch may work if you dont want to use WWW. There is also the webclient in the system.net that I have used before but not inside unity, but I know that has a async download, I used it here webclient example: WebClient webClient = new WebClient(); webClient.DownloadProgressChanged += OnChange; webClient.DownloadFileCompleted += OnCompleted; webClient.DownloadFileAsync(new Uri(download), fileAndPath);
d4d2f3611e0c323b436cf8f67bfe6d90974c3414a2c88ee350c3375d7b04c83c
['6ca9048312424bc19faf4a4df836a552']
I'm trying to hook IDirect3DDevice9<IP_ADDRESS>Present or <IP_ADDRESS>EndScene and render my own overlay (which, for now, is just a simple rectangle) on top of everything else in a D3D9 application, but my overlay seems to be appearing and disappearing quite randomly. The drawing code I'm currently using is: typedef struct CUSTOMVERTEX { float x, y, z, rwh; DWORD color; }; #define CUSTOMFVF (D3DFVF_XYZRHW | D3DFVF_DIFFUSE) void draw() { // the positions are just for testing purposes, so they don't really make sense CUSTOMVERTEX vertices[] = { { 0, 0, 0, 1.0f, D3DCOLOR_XRGB(255, 255, 255) }, { 0, cursor_pos.y+500, 0, 1.0f, D3DCOLOR_XRGB(127, 255, 255) }, { cursor_pos.x, cursor_pos.y, 0, 1.0f, D3DCOLOR_XRGB(255,255, 255) }, { cursor_pos.x, 600, 0, 1.0f, D3DCOLOR_XRGB(127, 0, 0) } }; if (vBuffer == 0) return; VOID* pVoid; vBuffer->Lock(0, 0, &pVoid, 0); memcpy(pVoid, vertices, sizeof(vertices)); vBuffer->Unlock(); d3dDevice->SetRenderState(D3DRS_LIGHTING, FALSE); d3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); D3DMATRIX orthographicMatrix; D3DMATRIX identityMatrix; // MAKE_D3DMATRIX should be equivalent to D3DXMATRIX constructor D3DMATRIX viewMatrix = MAKE_D3DMATRIX( 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ((float)-(get_window_width()/2)), ((float)-(get_window_height()/ 2)), 0, 1 ); // MAKE_ORTHO_LH is equivalent to D3DMatrixOrthoLH MAKE_ORTHO_LH(&orthographicMatrix, (FLOAT)get_window_width(), (FLOAT)get_window_height(), -1.0, 1.0); // and this to D3DMatrixIdentity MAKE_IDENTITY(&identityMatrix); // and this to D3DMatrixIdentity d3dDevice->SetTransform(D3DTS_PROJECTION, &orthographicMatrix); d3dDevice->SetTransform(D3DTS_WORLD, &identityMatrix); d3dDevice->SetTransform(D3DTS_VIEW, &viewMatrix); d3dDevice->SetRenderState(D3DRS_ZENABLE, false); d3dDevice->SetFVF(CUSTOMFVF); d3dDevice->SetStreamSource(0, vBuffer, 0, sizeof(CUSTOMVERTEX)); d3dDevice->DrawPrimitive(D3DPT_TRIANGLEFAN, 0, 2); d3dDevice->SetRenderState(D3DRS_ZENABLE, true); } I can't seem to figure out why this would cause the overlay to pop in and out of existence at seemingly random points in time.. What am I missing?
41ce9be56eb016662a8f51d4585b7b715f73e17149882cd6f0e3e1b163347031
['6ca9048312424bc19faf4a4df836a552']
I'm trying to figure out a way to convert from a string of type wchar_t* to char, but for some reason having trouble making it work. I have successfully done the opposite (from char to wchar_t*) with mbsrtowcs(), but this defeats me. The return value section inman 3 wcsrtombs has this: The wcsrtombs() function returns the number of bytes that make up the converted part of multibyte sequence, not including the terminating null byte. If a wide character was encountered which could not be converted, (size_t) -1 is returned, and errno set to EILSEQ. Consider this minimal example: #include <string.h> #include <time.h> #include <stdlib.h> #include <ctype.h> #include <stdbool.h> #include <locale.h> #include <wctype.h> #include <wchar.h> char *convert_to_multibyte(const wchar_t* arg, long num_chars) { size_t buffer_size = num_chars * sizeof(wchar_t); char *mb = malloc(buffer_size); // will waste some memory though mbstate_t state; wcsrtombs(NULL, &arg, 0, &state); // this supposedly will initialize the mbstate_t struct size_t result; result = wcsrtombs(mb, &arg, buffer_size, &state); if (result == (size_t)-1) { free(mb); return NULL; } mb[buffer_size-1] = '\0'; return mb; } int main(int argc, char* argv[]) { setlocale(LC_ALL, "fi_FI.UTF-8"); wchar_t test[] = L"ÄÄÄÄÖÖÖÖ"; char *converted = convert_to_multibyte(test, wcslen(test)); // printf("%s\n", converted); return 0; } With the test string L"ÄÄÄÄÖÖÖÖ", (size_t) -1 is returned, which implies an inconvertible wide char was encountered - this doesn't happen with a string that doesn't have any non-ASCII characters. What am I not understanding here?
6be0fee3ccb4b8ac380430ff4fe3422b7e0009d27ccc1ece895f6eaf5c88d47a
['6cc1b3cfec68477fba5bcf77917228b7']
I used NMDS axes of an ecological community as proxys for the community similarity in the different samples. I would like to "quantify" the importance of the different NMDS axis according to the stressreduction. Now my question is: If I calculate an NMDS with one dimension would the NMDS axis of that be the same as the first axis of a NMDS calculated with two dimensions? Of course, I tried that myself using the metaMDS function in vegan and the axis are not exactly same but correlate with a coefficient >0.9. How can that be explained?
6f4c31f0d75ead0b576f284128e8395ccf645bddcceea5039af0c44318b55e6f
['6cc1b3cfec68477fba5bcf77917228b7']
So I know this must be a filter of some sort, just like you place caps in on power supplies as close as possible to the IC's that you're working with. But I'd like to know a bit more in detail about the function of an inductor between Vin and the AVDD pin of a IC (such as the STM32F303RET6). In another stack this example was given that shows an inductor just like I mean. Now, I'm making a PCB with the STM32... and the datasheet does not show typical applications with such a inductor, but a schematic I got from some source with the STM32 does have an inductor between +3v3 and AVDD of the chip but does not have an inductor between +3v3 and VDD. Why is that? Please excuse me for the maybe basic question but I'm trying to obtain some more common knowledge on the matter. This is why I'd very much like detailed explenations and tips/tricks for future designs. What are the rules of thumb on this matter?
cbb791ea982d5f625dcd992467ec0c1ce5ad9980c81999fd22326966bd538419
['6cc8156406d3469182ffe74b83b98898']
I think it might just be a matter of fixing the case statement...unless I didn't understand the problem correctly: update my_table set priority = case when priority = 1 then 3 when priority = 2 then 4 when priority = 3 then 5 when priority = 4 then 1 when priority = 5 then 1 else priority end where priority > 0;
13c48115219a40fbf5964c5df5de0c8f9d9202da0f88d7c829ce544da70f30c5
['6cc8156406d3469182ffe74b83b98898']
Your problem here is the auto_increment ID field. This is a primary key, since any auto_increment field must be defined as the table's primary key and therefore cannot have duplicate records. What you could do is create and additional field for your "ID" field that you want to duplicate and then you can insert normally and leave the auto incrementing field do it's thing.
e153379c45ad1c6681458606ea2a7d3973f811d47b36ab97f0c35ad614a69a44
['6ceed9ed89084475aeeec297d81b1f8c']
This problem has been introduced with version 1.4.4 of this library. I did not have time to dig deeper yet, but I suspect this particular commit: https://github.com/loopj/android-async-http/commit/9f73dc722fdf8b564bf1487eef395d0b7e4ae862 to be responsible for this issue. As a workaround, use version 1.4.3 for now. It should work fine.
b021bb7783a98561ba9c0206a992c621b806c73dbe7fcf45f58c3347837fe10d
['6ceed9ed89084475aeeec297d81b1f8c']
After you have created the icon, you should first generate an id for it: icon.setId(View.generateViewId()); Then, remove the setMargins line and add these lines below layout.addView(icon): ConstraintSet set = new ConstraintSet(); set.clone(layout); set.constrainWidth(icon.getId(), (int)(90*scale)); set.constrainHeight(icon.getId(), (int)(90*scale)); set.connect(icon.getId(), ConstraintSet.TOP, ConstraintSet.PARENT_ID, ConstraintSet.TOP, 0); set.connect(icon.getId(), ConstraintSet.START, ConstraintSet.PARENT_ID, ConstraintSet.START, 100); set.applyTo(layout); I haven't tested it but it should be a step in the right direction. Let me know how it goes.
db817e25aaea3a7fb56fdbc85cfddab9fec7488a091765bb39d7086c487a793a
['6cf34b0306ae4b60adafe4e8ac2db904']
I'm trying to scrape player data off of https://sofifa.com using BeautifulSoup. Every page displays 60 players and so I use offset query param(for example https://sofifa.com/players?offset=60 shows 2nd page) to access all player's info. One thing I noticed is that the offset value never ends(i.e. no matter how large the offset value I provide, it always shows me a page). Specifically, I noticed that for offset > 20000 or so, it always displays the 1st page(essentially after exhausting all players, it kinda rolls over to the 1st page and always displays that for all subsequent higher offset values). Try with https://sofifa.com/players?offset=20000000 to get an idea of what I mean. I want to know if there is any way I can programmatically find out the last "valid" offset value; beyond which I am sure to get the 1st page back. That'll help me decide when I reached the end of the dataset. Currently this is how I scrape: for offset in range(0, 20000, 60): try: print("Processing page at offset " + str(offset)) sofifa_url = "https://sofifa.com/players?offset=" + str(offset) # start scraping the page : : except Exception as e: print("Exception occured: " + str(e)) continue
eff7da3614e0b95c459c8c831a09500642e5f5d64bbacc9736113739f092f634
['6cf34b0306ae4b60adafe4e8ac2db904']
I'm digging into pandas aggregator function while working with a wine reviews dataset. To aggregate points given by wine reviewers, I noticed that, when I used mean as a standalone function in agg(): reviewer_mean_ratings = reviews.groupby('taster_name').points.agg('mean') The output looks like this: Noticed that the output has 2 columns(at least that's what it looks like visually). But type(reviewer_mean_ratings) = pandas.core.series.Series Is that just 1 column with space between the name and mean rating? I'm confused. Also noticed that, I cannot sort this output in descending order by the mean ratings. Instead if I had used mean as a list in agg() then descending order works using sort_values() method later. My hypothesis is that if I want to access the mean ratings column later, the only way to do it is to use agg(['mean']) instead of agg('mean') in the original query. Am I mistaken somewhere?
aa7eb189b2c8ec47233fc52cea6951e0ff562c8eb586232c47c930f35fd9966a
['6d03a40c2fd943d6a8168a920c85a5a1']
While 2.0 projects are generally upgradable to 4.5.x with no code changes, there are breaking-differences between .NET versions that you may run into. Given the scale and complexity of your project I must advise against blindly changing the TargetFramework property and hoping for the best. While 4.0 executables can load 2.0 DLLs, it is not recommended because of the breaking-changes I described. You will run into problems with the mixing of C++ code. I recommend you start by upgrading (or rather, rewriting) your "Managed Extensions for C++" code to C++/CLI (you might want to take advantage of C++11 and C++14 features present in VS2015 while you're at it). I recommend upgrading each project individually and separately, working your way up the dependency-chain. It will help if you have (or will write) unit tests and integration tests for more critical parts of your system.
45b8e19df5aa4a15087cb6abbf462ccb7de7207f4e0b77029c78dbf84b5d6a1f
['6d03a40c2fd943d6a8168a920c85a5a1']
Correct. It seems to be building a SQL statement by string concatenation without performing any sanitation. This might be acceptable if all input can be trusted, but given it's a public function I don't think that's the case. The return true seems superfluous as it never returns anything else - the author might have intended it as a way to ensure the function completed, which implies the code it uses fails-silently instead of calling die() or throwing an exception. Style-wise, the author isn't consistent with concatenation: in some places it's straight-forward concatenation with the . operator, in other places it uses $placeholders. If $changes is empty then the call to substr will fail, doing a trim after building a list is the wrong way to comma-separate list-items. This is how I'd do it (except, never with SQL, of course): $first = true; foreach($changes as $field => $value ) { if( !$first ) $update .= ", "; $first = false; $update .= "`$field` = '{$value}'"; // NEVER DO THIS } Thinking about it - the only thing good about this function is it's well-documented.
e3ca58e4dbc9803f37c50dfec60118e40d7d9239f5498459ec34ab1d871b07d7
['6d087944520b443a8534de6935a2cf72']
I need to sample from multivariate normal distribution with mean vector $\mu$ and covariance matrix $\Sigma_1$. For that I want to use the decomposition of $\Sigma_1$ into $UΛ{U}^T$ and samle as $\mu + Lz$ with $L=U\sqrtΛ$ and $z$ being vector of independent standard normal variates. However, I do not know decomposition of matrix $\Sigma_1$, but do know decomposition of matrix $Σ_0$ such that $Σ_1=const*Σ_0$. Is there any easy way of calculating decomposition of matrix $Σ_1$ knowing decomposition of matrix $Σ_0$ or is there none?
ff0fd06ff4301cf8f44518bbde805984b8c3697a4bc89f7640ab55929fc54516
['6d087944520b443a8534de6935a2cf72']
I've got a problem on my Solaris servers. When I launch a Sun Java process with restricted memory it takes more than twice the ressources. For example, I have 64 Go of memory on my servers. 1 is on Linux, the others are on Solaris. I ran the same softwares on all servers (only java). When servers starts they took between 400Mb and 1,2Gb of RAM. I launch my java process (generally between 4 and 16go per java process) and I can't run more than 32 Gb defined with Xmx and Xmx values. I got this kind of errors : > /java -d64 -Xms8G -Xmx8G -version Error occurred during initialization of VM Could not reserve enough space for object heap As we can see here, I got a lot of reserved memory and it's made by java process : > swap -s total: 22303112k bytes allocated + 33845592k reserved = 56148704k used, 704828k available As soon as I kill them 1 by 1, I recover my reserved space and could launch others. But in fact I can't use more than a half my memory. Anybody know how to resolve this problem ? Thanks
b286fd222b5499ce0793ababb727b123870ae2cb2482dda4d45e3d11e5a27569
['6d0db39134d4410bb5ea7fd0f6f2ec9c']
I'd like to build a DIY macro-studio at home for shooting flowers and other objects. I'd like to have an option to shoot with multiple light sources - at least 4. My other priorities are low cost and also correctness of color rendering. I'm puzzled whether should I choose LED lighting or flashes for that purpose. What considerations should I take into account? Here are pros and cons of each option that I see. LED Pros Relatively cheap (though there are cheap flashes too, so it's possible to buy cheap slave-flashes for additional light sources). Ability to model lighting before shooting. Cons Poorer color rendering compared to flashes. Flash Pros Much more usable outdoors: Flashes can suppress unneeded light by overpowering it. Ability to shoot at very high shutter speeds to avoid blurry images or capture moving subjects. Better battery life. Best color rendition. More lightweight than LEDs. TTL. Cons More complex/costly setup for multiple flashes with wireless communication. Hard to choose right one - there are so many different flash manufacturers with incompatible wireless communication protocols.
011dece4f5c0a42c93b59f1cf56bfffbf53d0956ba0eb9de21431b207c37434b
['6d0db39134d4410bb5ea7fd0f6f2ec9c']
Maybe a bit late, but in general it is unsafe to run any serious machine with root as the only user. In this way anyone administering the machine could destroy it with an unintended command. This is why you should always create one or more less privileged (read: ordinary) users. If needed these less privileged users could use the "sudo" command in order to execute tasks requiring root privileges.
d3975557185ce1655a3a3f18536610080b0c7ab770ece8e02041a3d78b51e7aa
['6d1484ed27d94386a1ad1f6d6d3c8835']
I am currently going through SICP and I am having a hard time understanding the difference between the two expressions below. Assume we have a list, called lst, What is the difference between: (null? lst) and (null? (cdr lst)) I know that the first expression checks if the list is empty. But doesn't the second expression check for the same condition as well? In other words checks if the rest of the list is empty.
cb66d6b7686f9ec323c5c1bc1316b77137c42bc5f62f904145695cefb553cc8a
['6d1484ed27d94386a1ad1f6d6d3c8835']
Assume we have a file called 'teams.csv'. We want to do the operation below to all the rows in the file 'teams.csv' and return a file with the same name but now with only 3 columns instead of 5. And we also need to name our new column 'sport'. In the file '***' indicate that a person does not play that particular sport. I have a CSV with the following columns: And want the CSV file with only 3 cols as shown below
8eaedda8c7dc208348fb13aa438ea2948fe0d2ed035311ea8cdf7631be568a22
['6d2f57314e1040d287f3f8c6b4415277']
I have a bunch of files that are causing me problems. I am working locally on my Mac and I have files called something.ini.php and they are being shown as text, while my something.php files are coming up fine. How can I get my something.ini.php to be processed as PHP? My PHP part <IfModule php5_module> AddHandler php5-script .php AddType application/x-httpd-php-source .phps <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> </IfModule>
541543f4e82d0a5d1c6eb314f9f590f4c9ea5c5a6b6b77c79dd29ddf25a649f3
['6d2f57314e1040d287f3f8c6b4415277']
The reason for the discrepancy is the inter-character spacing (obj.data.space_character, where obj is the long text object). There are 5 additional inter-character spaces in the long text object, and if I add them to the short string length x 6 then the lengths almost match. There is still a small discrepancy (of 0.06 mm/batch of 5 Is) which I can't explain, but it's so small that it can be safely ignored for the purpose of this exercise.
72ef764af809a748cfabfccb23717c342d50cfe9c2fb68781be89aa9b78e44d5
['6d34ca78be4f470490cf694824635097']
I have an app build for iOS 5.0 and works fine running the same app on iOS 6 crashed on launch. It seems to be crashing before calling didFinishLaunchingWithOptions method. It's crashing as bad_excess on 0x00480848 <+0024> ldr r0, [pc, #240] (0x48093c <_ZN6google8protobuf18InsertIfNotPresentISt3mapISsSt4pairIPKviESt4lessISsESaIS3_IKSsS6_EEESsS6_EEbPT_RKT0_RKT1_+268>) 0x0048084a <+0026> ldr r1, [pc, #244] (0x480940 <_ZN6google8protobuf18InsertIfNotPresentISt3mapISsSt4pairIPKviESt4lessISsESaIS3_IKSsS6_EEESsS6_EEbPT_RKT0_RKT1_+272>)
08a8c40168c7aadc38be8fc58dd318419c2b6f2f5f3fbcd5dede2ff42235036f
['6d34ca78be4f470490cf694824635097']
What are the best practices to add sensitive data to the iOS application? For sensitive data I mean a key or token to communicate with some external server. Can we compile a certificate in the app, and iOS can remove it on installation? I feel like we can not really 100% guarantee security of it, but what is the best practice layer we can add.
94f9a6a79f5d59765b4574cee7f093a935c13ded42634576701dbf4aca21ad52
['6d3e3ec3e9344440aa2ba941ebd53e8e']
The short answer to your question is that Fluent can't handle that situation yet, and you should map it with a .hbm.xml file. The long answer is that Fluent CAN actually do it if the composite keys of your 2 parent tables are instead made up of foreign keys to 4 separate grandparent tables (GPA1,GPA2,GPB1,GPB2 - in the example below). In that case, the mapping could look something like this... (but it IS a bit hackey) //OBJECTS public class GPA1 { public virtual long ID {get;set;} } public class GPA2 { public virtual long ID { get; set; } } public class GPB1 { public virtual long ID { get; set; } } public class GPB2 { public virtual long ID { get; set; } } public class M2M2ParentA { public virtual GPA1 ID1A { get; set; } public virtual GPA2 ID2A { get; set; } } public class M2M2ParentB { public virtual GPB1 ID1B { get; set; } public virtual GPB2 ID2B { get; set; } } public class M2M2Link { public virtual M2M2ParentA LinkA { get; set; } public virtual M2M2ParentB LinkB { get; set; } public virtual GPA1 ID1A { get { return LinkA.ID1A; } set { LinkA.ID1A = value; } } public virtual GPA2 ID2A { get { return LinkA.ID2A; } set { LinkA.ID2A = value; } } public virtual GPB1 ID1B { get { return LinkB.ID1B; } set { LinkB.ID1B = value; } } public virtual GPB2 ID2B { get { return LinkB.ID2B; } set { LinkB.ID2B = value; } } } //FLUENT MAPPINGS public class GPA1Map : ClassMap<GPA1> { public GPA1Map() { Table("GPA1"); Id(x => x.ID, "id_column"); } } public class GPA2Map : ClassMap<GPA2> { public GPA2Map() { Table("GPA1"); Id(x => x.ID, "id_column"); } } public class GPB1Map : ClassMap<GPB1> { public GPB1Map() { Table("GPA1"); Id(x => x.ID, "id_column"); } } public class GPB2Map : ClassMap<GPB2> { public GPB2Map() { Table("GPA1"); Id(x => x.ID, "id_column"); } } public class M2M2ParentAMap : ClassMap<M2M2ParentA> { public M2M2ParentAMap() { Table("M2M2ParentA"); CompositeId() .KeyReference(x => x.ID1A, "M2M2ParentAId1") .KeyReference(x => x.ID1A, "M2M2ParentAId2"); } } public class M2M2ParentBMap : ClassMap<M2M2ParentB> { public M2M2ParentBMap() { Table("M2M2ParentB"); CompositeId() .KeyReference(x => x.ID1B, "M2M2ParentBId1") .KeyReference(x => x.ID1B, "M2M2ParentBId2"); } } public class M2M2LinkMap : ClassMap<M2M2Link> { public M2M2LinkMap() { Table("M2M2Link"); CompositeId() .KeyReference(x => x.ID1A, "M2M2ParentA_Id1") .KeyReference(x => x.ID1B, "M2M2ParentA_Id2") .KeyReference(x => x.ID2A, "M2M2ParentB_Id1") .KeyReference(x => x.ID2B, "M2M2ParentB_Id2"); } } There should be HasMany<> relationships in each of those mapping classes, but I got lazy. If you go the route of including a .hbm.xml file, I'd recommend using the .ExportTo("c:\") function when you configure your ISessionFactory and you can just edit the hbm file that fluent puts out. It's a great starting point. HTH, -Danno
e2b96cb459fc6d0b3aa83556e78ad3aaf90cf70986645d8ee5013dc0db008b33
['6d3e3ec3e9344440aa2ba941ebd53e8e']
A little back-story: When testing an installer for our C# (.NET 4.0) software recently, we installed on 7 or 8 different machines with success. But, one of our QA members installed and was able to get the application to consistently crash on his machine. The first thing our application does - before anything else - is to spawn an external application, wait for it to do its thing, (more on this later) then exit. If we didn't launch the external application, it would prevent the crash on his machine. The truly odd thing is that the crash happens much later in the main application. Long after the external exe had finished and exited. To verify that it wasn't the external process itself, I had the main app launch notepad instead. When he exited notepad, the application would resume as usual. This ALSO caused the crash. In the end, telling the external application to start up with "Process.UseShellExecute = false" prevented the crash. //Successful code Process myProcess = new Process(); myProcess.StartInfo.FileName = "MyProcess.exe"; myProcess.StartInfo.UseShellExecute = false;//Only difference between crashing and non-crashing code myProcess.Start(); myProcess.WaitForExit(); ... myProcess.Dispose(); myProcess = null; Other relevant info: The crash always happened on an attempted method call in an imported DLL written in Delphi 5 ages ago. Unfortunately, I don't know much about the inner-workings of this DLL, but the fact that this has only failed on this specific machine makes me think that it's not the issue. The error we got from event viewer was this: Faulting module name: ntdll.dll, version: 6.1.7601.22436, time stamp: 0x521eaa80 Exception code: 0xc0000374 (0xc0000374 is a heap corruption) It makes sense to me that the two types of execution would be different, but what could be different about this person's machine that using the Windows Shell would cause a crash?
b17651f925223588bdd7af5058b55250bdf0214df764ed32e5036b6b762cb5ba
['6d4cfaa24262489fbb85a249376feca9']
I followed some tutorial on how to detect the GPS location and to display it in a Toast message. The problem was that the toast message kept showing even after the application was exited. (It was running in the background). I have tried to stop it by using close(), within overriden method onStop(), onResume() and onPause().
fe09ccadaed4da6d98575c78aa46c09e0849773820781ec60cbbb9ba73540a99
['6d4cfaa24262489fbb85a249376feca9']
I wonder if it is possible to have an EditText on a Bitmap, in Android. I want that the user shall be able to enter some text in the EditText, which shall appear at the bottom of the screen, but also be able to see and click on the Bitmap. I saw similar questions, but I couldn't find any answer to them. Anyone solved this issue? Thanks, in advance.
251e4fd87d7d5d532e34ab59fac00fc15f2713432e38dffde3f44a16ff1f4ca7
['6d4f2ebb5fcc40c39ba4aa4ab892e417']
In Kendo NumericTextBox if the value is updated on the component for e.x. in the Plunkr I have a interval trigger to increase value every 2 seconds, the updated value is visible on NumericTextBox only when the textbox is in focus. As per Angular2 data-binding any expression like [value]="numberValue" should hook for changes to "numberValue" and update it's value. Plunkr for issue `http://plnkr.co/edit/omlefk6zfhHc4lB3yXzt?p=preview`
7a628aeb28cff4c528909b013914f49e267f93a1bda739488c969fe7b95ca060
['6d4f2ebb5fcc40c39ba4aa4ab892e417']
I have taken latest RC0 of Kendo UI for Angular2. It's docs mentions use of Internationalization service. I have created custom IntlService and configured it's provider in my App Module. In the component if I use the IntlService dependency then my custom service is invoked, but the NumericTextBox is not calling my service. What's wrong in the following code? MyIntlService.ts import { CldrIntlService } from '@progress/kendo-angular-intl'; import { Injectable } from '@angular/core'; @Injectable() export class MyIntlService extends CldrIntlService { constructor() { super("en-US"); console.info('From MyIntlService ctor'); } formatNumber(value: number, format: string| NumberFormatOptions){ const result = super.formatNumber(value,format); console.log('In MyIntlService formatNumber'); return result; } } app.module.ts @NgModule({ imports: [ BrowserModule, InputsModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ], providers: [{ provide: IntlService, useClass: MyIntlService }] }) export class AppModule { } app.component export class AppComponent { constructor(private intl: IntlService) { console.log( " From AppComponent " + intl.formatNumber(42, "c")); } }
ef9ccbae72b5568577e5811a1b0a5ea2b02f71a574b6c1bf40a7e5bde456e007
['6d693473a2ad44b1973ba38c729784d2']
I'm trying to write a simple hello world program in visual c++ using visual studio 2010 prof. Im getting the following error after successful build. System Error: Application couldn't start because stlport.5.2.dll is missing When I searched about it it is an open source project. So what is the link between these two? The only thing I changed from default VS installation is importing settings from other machine which is main build machine for our company. Here is what I did: 1. Create an empty project. 2. Added a source file Main.cpp with hello world line. 3. F7 4. Ctrl+F5 Now I'm getting above error
c283fa86815e72e105c2ffa2d5f68fd4d7bc2fcba67a516bae03cbcb58967858
['6d693473a2ad44b1973ba38c729784d2']
I never did native android programming but as Android uses Linux kernel, the executable format used will most likely be "ELF". As far as ELF is concerned, there is no version information of Shared object stored in the file. So unless the file name itself is saying something like "libXXX.VERSION.so", there is no other way to find out the version number of the shared object. This technique is generally used in Linux. My suggestions for solving your issue are: Use Date modified if possible to differentiate the shared objects Use dlopen() or similar to open the shared object and try to see the functions being exported. Source: http://man7.org/linux/man-pages/man5/elf.5.html Note: E_VERSION in the executable is the version of ELF format, not of executable.
875fef9151e906925f74a7c84fb1fb5360582916bdfd16654264e0093163c335
['6d69fa7455c84558878a9b9f00eca32d']
If it is important that there is an opening bracket you might consider using a lookbehind. The RegEx to select the position would be something like this: String s = "{Hi This Is My String}, I Want To Add New Line Here"; String replace = s.replaceAll("(?<=\\{.*)\\},", "\\},\n"); System.out.println(replace);
8061f46fc8b80d6001e001a73fe54cba4a578b50f6f4c1aa618d459659a0e243
['6d69fa7455c84558878a9b9f00eca32d']
I want to put a non generic class into a List with the type of a generic base class. However the code wont combile with the error that a conversion is not possible. I am pretty new to C# so I might just miss something very basic here or my approch to use generics that way is just no good idea? My code looks something like this: public abstract class AbstractClass{ public string foo; } public class A : AbstractClass{ public int bar } public class B : AbstractClass{ public int baz } public abstract class AbstractBehaviour<T> : MonoBehaviour where T : AbstractClass{ public T data; public abstract string compute(T arg); } public class ABehaviour : AbstractBehaviour<A>{ //some implementation of compute } public class BBehaviour : AbstractBehaviour<B>{ //some implementation of compute } With this setup I would like to do something like this: ABehaviour a = new ABehaviour(); BBehaviour b = new BBehaviour(); List<AbstractBehaviour<AbstractClass>> list = new List<AbstractBehaviour<AbstractClass>>(); list.Add(a); list.Add(b); Thank you very much.
2c54071e609e38823b39ae6408d6f7802f00640bb67feed2b9403d7c8b0ff889
['6d94c2dcaec44856bd1ae659c319ed77']
I've found a number of questions about how to stop the python-requests package from decoding gzip responses but in my case I would like it to but it doesn't. The headers from the response are below and I imagine there is something missing that means requests believes that the data is not gzipped - is there a way that I can convince it that the data is gzipped and get it to unzip it? 'content-length': '56185' 'x-amz-id-2': 'M+hA+/y9hrL1t4zuBajryQHmhr3lnaeDqdeE5gXwnOmEwgJI6QWbw/M51M0rx3+r' 'accept-ranges': 'bytes' 'server': 'AmazonS3' 'last-modified': 'Tue, 24 May 2016 00:25:37 GMT' 'x-amz-request-id': 'D2694ABDCA2417E2' 'etag': '"44b77ad22e8edc8f4fab543b3d16b500"' 'date': 'Tue, 24 May 2016 10:18:01 GMT' 'x-amz-server-side-encryption': 'AES256' 'content-type': ''
44b8580c74d347d60a562ae0b82c8b0093dd3f13506d76034ae4fbcafddc80d3
['6d94c2dcaec44856bd1ae659c319ed77']
I have a Java application and would like to store off 'the logs as they were when the application later terminated' in order to debug possible shutdown issues. The logic I have in mind is: Create my own logger class based on log4j Override activateOptions() to save off the files before logging starts Leave everything else the same. But that raises some questions: Is activateOptions() the correct place for this logic? Is there an equivalent of activateOptions() in basic Java logging or must I go with log4j? Is there a better way that I've not yet discovered? Thanks for any suggestions.
11e90979cabc00e624a2a93fec5fc4e1fa0c24b453ef60be654b480f30327cc1
['6da20f3a68e54f04be099cee449052dd']
Is this the output you're looking for? (your data is stored as factors, which may be causing you trouble). require(ggplot2) mydata <- as.data.frame(mydata) d1 <- as.data.frame(apply(mydata[,2:7], 2, function(x) as.numeric(as.character(x)))) d2 <- data.frame(IB_value = c(d1$IB_value1, d1$IB_value2, d1$IB_value3), size = c(d1$size1, d1$size2, d1$size3), num = rep(1:3, each = 10)) ggplot(data = d2) + geom_path(aes(x = size, y = IB_value, color = factor(num))
acc9b886cd9e339b0a04a5276f21ade88a47709fc89e7503723c27d6f15656bb
['6da20f3a68e54f04be099cee449052dd']
If you try to convert a factor into a number, it'll give you the number of the level in the factor. To convert into numbers, you can first run as.character, which will safely turn it into a format that you can run as.numeric on. test <- as.factor(c(0, 1)) as.numeric(test) # [1] 1 2 as.numeric(as.character(test)) # [1] 0 1 The R FAQ recommends a different approach for speed 7.10 How do I convert factors to numeric? It may happen that when reading numeric data into R (usually, when reading in a file), they come in as factors. If f is such a factor object, you can use as.numeric(as.character(f)) to get the numbers back. More efficient, but harder to remember, is as.numeric(levels(f))[as.integer(f)] In any case, do not call as.numeric() or their likes directly for the task at hand (as as.numeric() or unclass() give the internal codes).
41f269685fcf434b6b71db45a16dbd520ddb0a62fd47506931bb1939e8262591
['6db0cb694a784545be755d1f7ca72120']
i used $('.slick-track li:nth-child(3) a img').css("background-color", "yellow"); $('.slick-track li:nth-child(3) a').css("background-color", "yellow"); $('.slick-track li:nth-child(3)').css("background-color", "yellow"); its work but when i try click event nothing happen ! $('.slick-track li:nth-child(3) a img').click(); $('.slick-track li:nth-child(3) a').click(); $('.slick-track li:nth-child(3)').click();
8706bddab342384da1daecc195c52f044215a9b9f4e262d8665fbc3e008b9c34
['6db0cb694a784545be755d1f7ca72120']
i have two type of image upload : first high resolution : $specialImages = count($_FILES['specialImg']['name']); $specialMinwidth = 3000; $specialMinheight = 2500; $urlSpecialImages = array(); if ($specialImages) { for ($i=1; $i<=$specialImages; $i++) { if ($_FILES['specialImg']['name'][$i] != "") { if ((($_FILES['specialImg']['type'][$i] == "image/pjpeg") || ($_FILES['specialImg']['type'][$i] == "image/jpeg") || ($_FILES['specialImg']['type'][$i] == "image/png")) && ($_FILES['specialImg']['size'][$i] < $this->return_bytes(ini_get('post_max_size')))) { list($width, $height, $type, $attr) = getimagesize($_FILES['specialImg']['tmp_name'][$i]); if ($width >= $specialMinwidth && $height >= $specialMinheight) { $urlSpecialImages[$i] = $_FILES['specialImg']['tmp_name'][$i]; } else { $this->errors[] = $this->module->l("L'image doit être au format minimum de 3000px x 2500px", 'addproduct'); } second low resolution : $images = count($_FILES['images']['name']); $minwidth = 1500; $minheight = 1500; if ($images <= Configuration<IP_ADDRESS>get('JMARKETPLACE_MAX_IMAGES')) { for ($i=1; $i<=Configuration<IP_ADDRESS>get('JMARKETPLACE_MAX_IMAGES'); $i++) { if ($_FILES['images']['name'][$i] != "") { if ((($_FILES['images']['type'][$i] == "image/pjpeg") || ($_FILES['images']['type'][$i] == "image/jpeg") || ($_FILES['images']['type'][$i] == "image/png")) && ($_FILES['images']['size'][$i] < $this->return_bytes(ini_get('post_max_size')))) { list($width, $height, $type, $attr) = getimagesize($_FILES['images']['tmp_name'][$i]); if ($width == $minwidth && $height == $minheight) { $url_images[$i] = $_FILES['images']['tmp_name'][$i]; } else { $this->errors[] = $this->module->l('The image format need to be 1500 x 1500 pixels', 'addproduct'); } i want to use the special $specialImages uploaded and resize them to . 1500x1500 on images low resolution ! because i want to get both resolution by one upload ! how can i do that ?
c2e732246d6409c8840ed84e403301166bc18e8aa5956b749f8a1e8d47bc4e9e
['6dbbf132dbc846c09eb29045946405ea']
I got the same issue and I solved it by downgrading the C# version from 7.2 to 7.1 from the project file which shows an error. I remembered that I applied some VS code hints which upgraded the C# version. the code hint was to add the paramaters name in the methods calls like later I tried to add a view and it showed the above problem. after so many hours of searching and reaching to nothing, I started to remember the C# version change I downgraded the C# version and removed the paramaters names then I added the view successfully. btw the error has no relation with the model which is a great mislead.
5f3c87066b7ed602429a0d8c9862f9c080e798004e9cac04598b866a61631d2d
['6dbbf132dbc846c09eb29045946405ea']
Yes, there is away to figure out each stream content. there is a signature for each file on this planet in addition to extension which is not reliable. it might be removed or falsely added. So what is the signature? In computing, a file signature is data used to identify or verify the contents of a file. In particular, it may refer to: File magic number: bytes within a file used to identify the format of the file; generally a short sequence of bytes (most are 2-4 bytes long) placed at the beginning of the file; see list of file signatures File checksum or more generally the result of a hash function over the file contents: data used to verify the integrity of the file contents, generally against transmission errors or malicious attacks. The signature can be included at the end of the file or in a separate file. I used the magic number to define the magic number term I'm copying this from Wikipedia In computer programming, the term magic number has multiple meanings. It could refer to one or more of the following: Unique values with unexplained meaning or multiple occurrences which could (preferably) be replaced with named constants A constant numerical or text value used to identify a file format or protocol; for files, see List of file signatures Distinctive unique values that are unlikely to be mistaken for other meanings(e.g., Globally Unique Identifiers) in the second point it is a certain sequence of bytes like PNG (89 50 4E 47 0D 0A 1A 0A) or BMP (42 4D) So how to know the magic number of each file? in this article "Investigating File Signatures Using PowerShell" we find the writer created a wonderful power shell function to get the magic number also he mentioned a tool and I'm copying this from his article PowerShell V5 brings in Format-Hex, which can provide an alternative approach to reading the file and displaying the hex and ASCII value to determine the magic number. form Format-Hex help I'm copying this description The Format-Hex cmdlet displays a file or other input as hexadecimal values. To determine the offset of a character from the output, add the number at the leftmost of the row to the number at the top of the column for that character. This cmdlet can help you determine the file type of a corrupted file or a file which may not have a file name extension. Run this cmdlet, and then inspect the results for file information. this tool is very good also to get the magic number of a file. Here is an example another tool is online hex editor but to be onset I didn't understand how to use it. now we got the magic number but how to know what type of data or is that file or stream? and that is the most good question. Luckily there are many database for these magic numbers. let me list some File Signatures FILE SIGNATURES TABLE List of file signatures for example the first database has a search capability. just enter the magic number with no spaces and search after you may find. Yes, may. There is a big possibility that you won't directly find the file type in question. I faced this and solved it by testing the streams against specific types of signatures. Like PNG I was searching for in a stream def GetPngStartingOffset(arr): #targted magic Number for png (89 50 4E 47 0D 0A 1A 0A) markerFound = False startingOffset = 0 previousValue = 0 arraylength = range(0, len(arr) -1) for i in arraylength: currentValue = arr[i] if (currentValue == 137): # 0x89 markerFound = True startingOffset = i previousValue = currentValue continue if currentValue == 80: # 0x50 if (markerFound and (previousValue == 137)): previousValue = currentValue continue markerFound = False elif currentValue == 78: # 0x4E if (markerFound and (previousValue == 80)): previousValue = currentValue continue markerFound = False elif currentValue == 71: # 0x47 if (markerFound and (previousValue == 78)): previousValue = currentValue continue markerFound = False elif currentValue == 13: # 0x0D if (markerFound and (previousValue == 71)): previousValue = currentValue continue markerFound = False elif currentValue == 10: # 0x0A if (markerFound and (previousValue == 26)): return startingOffset if (markerFound and (previousValue == 13)): previousValue = currentValue continue markerFound = False elif currentValue == 26: # 0x1A if (markerFound and (previousValue == 10)): previousValue = currentValue continue markerFound = False return 0 Once this function found the magic number I split the stream and save the png file arr = stream.read() a = list(arr) B = a[GetPngStartingOffset(a):len(a)] bytesString = bytes(B) image = Image.open(io.BytesIO(bytesString)) image.show() At the end this is not an end to end solution but it is a way to figure out streams content Thanks for reading and Thanks for <PERSON> for his patience
370bd7b0d5f106b2ad40540fcdd3f6873b28ea74a83332bb8f532315184a6627
['6dc2d65b46cd4eb2863a63a2e9533565']
Thank you for your answer. My code gets data from the server in json format and creates a loggedUser object. Then I open the tabbed view controler with the correct application. I would like you to evaluate my code and make any modifications to my code. I would like to learn to write a nice code on this basis
fc8a7959ea267a862c8342c4c0156405370b78504e2bba610ea989e15dee30af
['6dc2d65b46cd4eb2863a63a2e9533565']
Desde mi frontend con ReactJS , me llevo un archivo PDF, con base64 , ejemplo , en el body de la peticion , estoy pasando un objeto con la propiedad { file1: "data:application/pdf;base64,JVBERi0xLjMKM ->> es mas largo' }, , en el Backend de laravel quiero procesar este archivo , decodificarlo de base64 y guardarlo en el Storage , pero por mas que lo intento con las soluciones de los foros no condigo la solucion. cual es la manera mas sencilla y correcta de realizarlo ? Mi ultima solucion fue esta pero aun asi no me funciono $files = base64_decode($request['file1']); Storage<IP_ADDRESS>disk('local')->put('example3.pdf',$other['file1']);
4579fbaaed8e148c69371e0a79b8634b9f4156247fd4e8ad45d58c7c1177fa02
['6dc44fa388a545c6bec949a99a3dd3b9']
I guess I screwed up with a screw's head. This is not unusual and the question answered all over the place, but all existing answers I found were for wood screws. Mine's a small (diam ~1/12th inch, length ~1/6th inch?) brazen round-headed slot screw that holds the name tag of a brazen bell system, similar to this one. The screw was turned in with too much force. When trying too loosen it, the head lost some brass around the slot, so I can't get any force into the screw with my screwdrivers any more. What can I try, before changing the whole bell system?
a028b720aa3d9b19d0cb3b053f5b83c9958625e76cee060625a9e6d935505c00
['6dc44fa388a545c6bec949a99a3dd3b9']
You can serve almost any protein medium rare. I wouldn't want to eat poultry at that temperature, mind you. Cooking the protein to high temperature is not the only way to cook it safely. The high temperature kills almost all of the bacteria in seconds. But a lower temperature for a longer period of time does just as well. For instance, this chart lists how long it takes to pasteurize (kill the bacteria and other organisms) some common protein. From http://www.douglasbaldwin.com/sous-vide.html#Table_5.1 - Pasteurization Time for Meat (Beef, Pork, and Lamb) (starting at 41°F / 5°C and put in a 131–151°F / 55–66°C water bath) 55°C 56°C 57°C 58°C 59°C 60°C Thickness 131°F 133°F 134.5°F 136.5°F 138°F 140°F 5 mm 2 hr 1¼ hr 60 min 45 min 40 min 30 min 10 mm 2 hr 1½ hr 1¼ hr 55 min 45 min 40 min 15 mm 2¼ hr 1¾ hr 1½ hr 1¼ hr 60 min 55 min 20 mm 2½ hr 2 hr 1¾ hr 1½ hr 1¼ hr 1¼ hr 25 mm 2¾ hr 2¼ hr 2 hr 1¾ hr 1½ hr 1½ hr 30 mm 3 hr 2½ hr 2 hr 2 hr 1¾ hr 1½ hr 35 mm 3¼ hr 2¾ hr 2¼ hr 2 hr 2 hr 1¾ hr 40 mm 3½ hr 3 hr 2½ hr 2¼ hr 2¼ hr 2 hr 45 mm 4 hr 3¼ hr 3 hr 2¾ hr 2½ hr 2¼ hr 50 mm 4½ hr 3¾ hr 3¼ hr 3 hr 2¾ hr 2½ hr 55 mm 5 hr 4¼ hr 3¾ hr 3½ hr 3 hr 3 hr 60 mm 5¼ hr 4¾ hr 4¼ hr 3¾ hr 3½ hr 3¼ hr 65 mm 6 hr 5¼ hr 4¾ hr 4¼ hr 4 hr 3¾ hr 70 mm 6½ hr 5¾ hr 5¼ hr 4¾ hr 4¼ hr 4 hr 61°C 62°C 63°C 64°C 65°C 66°C Thickness 142°F 143.5°F 145.5°F 147°F 149°F 151°F 5 mm 25 min 25 min 18 min 16 min 14 min 13 min 10 mm 35 min 30 min 30 min 25 min 25 min 25 min 15 mm 50 min 45 min 40 min 40 min 35 min 35 min 20 mm 60 min 55 min 55 min 50 min 45 min 45 min 25 mm 1¼ hr 1¼ hr 1¼ hr 60 min 55 min 55 min 30 mm 1½ hr 1½ hr 1¼ hr 1¼ hr 1¼ hr 1¼ hr 35 mm 1¾ hr 1½ hr 1½ hr 1½ hr 1¼ hr 1¼ hr 40 mm 1¾ hr 1¾ hr 1¾ hr 1½ hr 1½ hr 1½ hr 45 mm 2¼ hr 2 hr 2 hr 1¾ hr 1¾ hr 1¾ hr 50 mm 2½ hr 2¼ hr 2¼ hr 2 hr 2 hr 2 hr 55 mm 2¾ hr 2¾ hr 2½ hr 2½ hr 2¼ hr 2¼ hr 60 mm 3 hr 3 hr 2¾ hr 2¾ hr 2½ hr 2½ hr 65 mm 3½ hr 3¼ hr 3¼ hr 3 hr 3 hr 2¾ hr 70 mm 3¾ hr 3¾ hr 3½ hr 3¼ hr 3¼ hr 3¼ hr Table 5.1: Time required to reduce Listeria by at least a million to one, Salmonella by at least three million to one, and E. coli by at least a hundred thousand to one in thawed meat starting at 41°F (5°C). I calculated the D- and z-values using linear regression from <PERSON> et al. (2006), <PERSON> et al. (2000), and <PERSON> and <PERSON> (1996): for E. coli I use D554.87 = 19.35 min; for Salmonella I use D557.58 = 13.18 min; and for Listeria I use D559.22 = 12.66 min. For my calculations I used a thermal diffusivity of 1.11×10-7 m2/s, a surface heat transfer coefficient of 95 W/m2-K, and took β=0 up to 30 mm and β=0.28 above 30 mm (to simulate the heating speed of a 2:3:5 box). For more information on calculating log reductions, see Appendix A. [Note that if the beef is seasoned using a sauce or marinate which will acidify the beef, then the pasteurizing times may need to be doubled to accommodate the increased thermal tolerance of Listeria (<PERSON> and <PERSON>, 1996).] There is more of this information available. Look for sous vide cooking times to see the appropriate cooking time for you choice of protein.
f8ae6530233a8fab6afd1ebe8cb1dd50009db95df5b598d61d727c9ce9e1d40a
['6dcbaa7b75c74943adaf1e9635e4ddb0']
In my WPF application I am trying to open cmd.exe through System.Diagnostics.Process but every time it hits process.Start() it closes immediately and I cannot write anything else to it. However if I call the static Process.Start() it will stay open but then I am unsure how to write to it. See below. var processInfo = new ProcessStartInfo("cmd.exe") { UseShellExecute = false, RedirectStandardInput = true, }; var process = new Process() { StartInfo = processInfo, }; process.Start(); // This close immediately and not work Process.Start("cmd.exe"); // This will work but can't write to it process.StandardInput.WriteLine(someText); process.StandardInput.WriteLine(moreText);
e6e51fabeb788080bd418c81ae8c08dc28e6d14efac9d2b0df40720e38d8d4c0
['6dcbaa7b75c74943adaf1e9635e4ddb0']
You can use C#'s delegates instead of defining your own. For delegates that point to void functions such as in your case, you can use Action. Instead of declaring and instantiating a delegate (or in this case an Action delegate) you can stick it directly in your SetWinEventHook method like this. The compiler will take care of instantiation. public void SetWinEventHook(Action<IntPtr, uint, IntPtr, int, int, uint, uint> myDelegate) { } Now in order to kick off the function that your delegate points to you do this myDelegate() the problem, however, is that this delegate needs the 7 arguments that you declared it will need. In order to provide that you can pass them in as a second argument in your SetWinEventHook method like this public void SetWinEventHook(Action<IntPtr, uint, IntPtr, int, int, uint, uint> myDelegate, IntPtr a, uint b, IntPtr c, int d, int e, uint f, uint g) { myDelegate(a,b,c,d,e,f,g); } So at this point you essentially 1) Declared a delegate 2) Instantiated a delegate 3) Created a hook method to kick off the delegate/function Now all you need to do is call your SetWinEventHook and pass in either a lambda or a function written elsewhere so that your delegate will point to it. SetWinEventHook((a, b, c, d, r, f, g) => // using lambda here { }, new IntPtr(), 1, new IntPtr(), 2,3,4,5 );
be2813d8e93d30c112615da55cce8eb34fddacbbb8ffe8c2f51ff455a7f23ab8
['6dd299b672f04a4cbbb537a222fa3010']
Why is there a need of a different function for a simple task. Use if..else. Assuming that if input1 has value equals value1, then only you have to set the required validation rule for the other input which is say input2. View: <form action="/controller_name/function_name/" method="POST"> <input type="text" name="input1" /> <input type="text" name="input2" /> <input type="submit" /> </form> Controller: class Controller_name extends CI_Controller { public function __construct() { parent<IP_ADDRESS>__construct(); $this->load->library('form_validation'); } public function function_name() { if($this->input->is_post()) { if($this->input->post('input1') == 'value1') { $this->form_validation->set_rules('input2', 'input2', 'required'); } if ($this->form_validation->run() == FALSE) { // something's wrong in form! } else { // form is good, proceed! } } } }
915c173934e34f4b15bef0b25a6b927c6008f4f181ca5dd96d7c88393cd7e31f
['6dd299b672f04a4cbbb537a222fa3010']
user574632 gave you a nice alternative. Still even want to use JavaScript you can try below. Use the jQuery onclick method having the id attribute of the link as selector. <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(function(){ $("#submit_link").on("click", function(){ var form = $(this); var url = form.attr("action"); var data = form.serialize(); $.post(url, data); }); }); </script> <form id='brief_weergeven[]' action='<?php echo $main; ?>beveiligd/achterbanner/nieuwsbrief.php' method='POST'> <input type='hidden' name='nummer' value='<?php echo $brieven[0]; ?>'> <input type='hidden' name='datum_maand' value='<?php echo $maand_getal; ?>'> <input type='hidden' name='datum_jaar' value='<?php echo $jaar; ?>'> <a href="#" id="submit_link" class='button'>Nieuwsbrief <?php echo $brieven[0]; ?> (<?php echo $maand .' ' .$jaar; ?>)<BR></a> </form>
2fadf8a653595d18166dc1c8a13fd875bb41b4d7bcd151fb38668a2d04ccccb5
['6de0c96caea64fde8c693750fcd17195']
Using a loop and catching user input, it can be achieved: #!/bin/bash # Store all list of files you want with extension png arr=(./*.png) for ((i=0; i<${#arr[@]};)) do # -s: do not echo input character # -n 1: read only 1 character (separate with space) read -s -n 1 key for ((j=0; j<10; j++, i++)) do if [[ $key = "" ]]; then open "${arr[$i]}"; # <--- This is where you will open your file. fi done done
24c4845e999c5096e0bdd05673ec8df33aac86772e3bb2a4f7968a5fa3d0b92c
['6de0c96caea64fde8c693750fcd17195']
First we can show that $$\binom{n}{k} = \frac{n}{k}\binom{n-1}{k-1}$$ We can see this easily if we're working with factorials. For the combinatorial proof the left hand side is simply choosing $k$ objects from $n$ objects. We can do the same on the rhs by first fixing one of the $n$ objects and then picking the rest of the $k-1$ objects from the remaining $n-1$ objects. This gives us $\binom{n-1}{k-1}$ $ { }$ $k$-selections containing our fixed object. Since there are $n$ objects we get a total of $n\binom {n-1}{k-1}$ $ { }$ $k$-selections. However we can see that each $k$-selection will be repeated $k$ times. This is because fixing each element of a $k$-selection introduces this $k$-selection. Dividing by $k$ gives us $$\binom{n}{k} = \frac{n}{k}\binom{n-1}{k-1}$$ We can now simplify your expression to give: \begin{align*}\sum_{k=1}^n k \binom{n}{k}^2 &= \sum_{k=1}^n k \binom{n}{k}\binom{n}{n-k} \\ &= \sum_{k=1}^n n \binom{n-1}{k-1}\binom{n}{n-k} \end{align*} By disregarding the common factor $n$ we simply have to prove that $$ \sum_{k=1}^n \binom{n-1}{k-1}\binom{n}{n-k} = \binom{2n-1}{n-1} $$ It is easy to see that we can also select $n-1$ objects from $2n-1$ objects by first choosing $k-1$ objects from a fixed $n-1$ objects then by choosing $n-k$ objects from the remaining $n $ objects. See <PERSON>–Vandermonde identity .
d7ebdcc2b15b6af59a6752a153968b24766ae654c6d7e3e1fb5fda77d9215366
['6de3740ffd7a4bb697c0b3fc56e90eb6']
psh. O(n) solutions are way better. Think of it by building a tree: iterate along the string if the character is '1', add a node to the the root of the tree. if the character is '2', add a child to each first level node. if the character is '3', add a child to each second level node. return the number of third layer nodes. this would be space inefficient so why don't we just store the number of nodes a each depth: infile >> in; long results[3] = {0}; for(int i = 0; i < in.length(); ++i) { switch(in[i]) { case '1': results[0]++; break; case '2': results[1]+=results[0]; break; case '3': results[2]+=results[1]; break; default:; } } cout << results[2] << endl;
6389d85989ea81c6ac10ee16aecc8bc73e0e4b8a35c4349ea19538762c9841f3
['6de3740ffd7a4bb697c0b3fc56e90eb6']
if(temp != NULL) { struct node* namebox = root; while (namebox!=NULL) { if(strcmp(namebox->Name,temp->Name) > 0) // if temp comes before this { temp->nextName = namebox->nextName; namebox->nextName = temp; //printf("here"); I'm guessing this is debugging stuff? } namebox = namebox->nextName; } } this is for general insertion but you have to do special cases when you add the first name and add to the beginning of the list
ba65bf26419c7c31513b51727ac8c190877b779cbdd30d6ab3548021f3ee0c59
['6de75d9798d14c6d98953fbb17bc051a']
The form here show input if a value is verified by the user, therefore a dynamic form field is required: <form class="form-horizontal" method="POST" action="ajouterProduit4" name="formulaire"> <div class="panel panel-default tabs"> <ul class="nav nav-tabs" role="tablist"> <li class="active"><a href="ajouterProduit2"><button name="btn2" style="background: transparent; border: none;">Fiche Technique</button></a></li> </ul> <div class="panel-body tab-content"> <div class="tab-pane active" id="tab-second"> <?php $reqt1 = "SELECT c.Libelle,c.ID FROM caracteristique c,fichetechnique f WHERE c.fichetechniqueID=f.ID AND c.fichetechniqueID='$categorie' LIMIT 0,10"; $reqt2 = "SELECT c.Libelle,c.ID FROM caracteristique c,fichetechnique f WHERE c.fichetechniqueID=f.ID AND c.fichetechniqueID='$categorie' LIMIT 10,10"; $rest1=mysqli_query($conne,$reqt1); $rest2=mysqli_query($conne,$reqt2); ?> <div class="col-md-6" id="txtHint"> <?php while ($rowt1= mysqli_fetch_row($rest1)) { ?> <div class="form-group"> <label class="col-md-3 control-label"><?php echo $rowt1[0] ?></label> <div class="col-md-9"> <div class="input-group"> <span class="input-group-addon"><span class="fa fa-pencil"></span></span> <input name="rowt1" type="text" class="form-control" /> </div> </div> </div> <?php } ?> </div> <div class="col-md-6"> <?php while ($rowt2= mysqli_fetch_row($rest2)) { ?> <div class="form-group"> <label class="col-md-3 control-label"><?php echo $rowt2[0] ?></label> <div class="col-md-9"> <div class="input-group"> <span class="input-group-addon"><span class="fa fa-pencil"></span></span> <input name="rowt2" type="text" class="form-control"/> </div> </div> </div> <?php } ?> </div> </div> </div> <div class="panel-footer"> <input type="reset" class="btn btn-default" value="Réinitialiser"> <button name="envoyer" class="btn btn-primary pull-right">Etape 3 <span class="fa fa-arrow-right fa-right"></span></button> </div> </div> </div> </form> However, I don't know how to go about inserting data into the database when it is not clear what the data may be (specifically the category) In pseudocode it would be ("INSERT INTO Category(Value) values ($value)") N.B: I only use procedural php
d938bbe1bd7e235ca9d41d3c9e416956227d040d4c11f71a18b992d54f316824
['6de75d9798d14c6d98953fbb17bc051a']
I need to use a view-based authorization and when i do the following, i get Server error in the application @if (User.Identity.IsAuthenticated) { if (User.IsInRole("Admin")) { <h4>Create a new document</h4> @using(Html.BeginForm("Create", "Document", null, FormMethod.Post, new { enctype = "multipart/form-data" })) { @Html.AntiForgeryToken() <span>SOME HTML COD</span> } } else { <span>Vous devez être administrateur pour accéder à cette section</span>} } else {<span>Vous devez être connecté pour accéder à cette section</span>} What may be the solution or the problem ? THE ERROR CAPTURE
e8a23958efc1adc923b6fbb70c0ad07ac0801a6b91cc079378ad8187c730dc20
['6dfc8548281f475bbe03c70b3d84d783']
Well, you have to use the input function of auto-complete called displayWith. you can find the solution to your problem in this link here plus I 've made a stackblitz example for you to simplify it more. Example to describe the solution: you have to add to your autocomplete component an input called displayWith <mat-autocomplete #auto="matAutocomplete" [displayWith]="checkValue"> and then in your component you have to create the function checkValue checkValue(value: any) { // here you can get your id or whatever you want console.log(value) } then you have to add to your mat option the value and give it your whole object as value <mat-option *ngFor="let option of options" [value]="option" > {{option.name}} </mat-option> Please check the stackblitz example for more details
c574ab6e97189c00b8f2f0b5bf15e5138ed6a6bb67cb5ffab4da79a6e832663b
['6dfc8548281f475bbe03c70b3d84d783']
I'm using Primefaces 3.5 with the jquery bundled inside of it. And i want to apply this small jquery code , it is a simple code , i added the behavior of the tab button to the enter button in the keyboard. Here it is my code: //<![CDATA[ $(document).ready(function(){ $(":input").keyup(function (event) { if (event.keyCode == 13) { $(this).next().focus(); } }) } ); //]]> The code does not work , and there is no errors in the console. I thought may be there was a conflict between my code and the jquery lib of primefaces So what is the problem ???
843d09f6631a02e79ac6523b11d85918ab6ba036c6d71b4df12097ab620317cc
['6dfd090e59444e39922a8106f1ebabef']
Now I see where was my mistake. I feel a bit silly asking, but I really didn't quite understand - when you add rows 2,3...n to column 1, I understand why the first number at the first column is n+1. But why do the other numbers at column 1 become n+1? The second number at the 1st column is 1, so you add the numbers of column 2,3,4...n it should be 1+2+(1)^n-1 no? What am I missing?
234f5928e8033b11ce099ef75cc7bab0b4e07d831b101d7c414dc898c00cfb65
['6dfd090e59444e39922a8106f1ebabef']
I see, thanks for clearing it up! Just to make sure I understand the way to prove this- If A=0 then everything is possible in the kernel, which means B is also possible, and therefore B is in the kernel. If B=0 and A is not zero, can I say that the kernel is only zero, which equals to B (both are zeros...)?
a7dbd79b2e260bfb1a9a92107bbbd3356a16a50615d826118297245cbd73b4c0
['6e02692b0ec74eb2883ebcecd97ad721']
This sounds more like a vue issue than a Umbraco one. You should be able to do it. After a quick google there is a working project here: https://github.com/ionic-team/ionic-vue-conference-app Have you tried explicitly installing packages with version numbers that work, e.g. npm install @ionic/vue@0.0.4
2b2ccaae3ff14723bd3be72369c40240507969e2bdaa096c03043dfc5d3d8cf9
['6e02692b0ec74eb2883ebcecd97ad721']
You can also see where the cache is with yarn cache dir. yarn cache dir Running yarn cache dir will print out the path where yarn’s global cache is currently stored. When you do a yarn cache clean You can check the folder actually cleans. If that fails you can manually delete it. yarn cache documentation
2a4474d9b8a427967ef2c9a26effa223032bb24d1c1d5456e7d4fcba32c18870
['6e36c898e9784885bebfcf2cf157db9b']
Do you have selenium drivers installed for the browser you want to test with? Try with webdriver-manager update It will take care of installing the drivers for you. You just need to run it once, if you call it again it will see that the drivers are already installed and will not procede.
4fad7974b53f07ab3911f0794d1713ea3697c115a550b4a1c1590e0e1e45a10c
['6e36c898e9784885bebfcf2cf157db9b']
I can see two possible issues here: Are you sure you are sharing the $scope of your controller with the dialog? If the div creating your dialog is not accessible by your controller, which means it's not a DOM node in the subtree of children of your controller root element, it will not display the properties (and will give no errors) Where are you calling $scope.errorDialog? If you are running that call outside of a $digest loop, you can maybe solve this by calling $scope.$apply after setting the properties. This wouldn't be the best solution though, it would be better to wrap the call of this function in the following fashion $scope.$apply(function() { $scope.errorDialog('title', 'message'); }) This would allow AngularJS to eventually intercept errors happened while executing $scope.errorDialog
f680a05de065e3987bdd75b1f24b3534f4d710537869254242bb31d2d26cd8cf
['6e3771844b504801b092c3a7790b9b16']
There's a bunch of questions that are phrased similarly, but I was unable to find one that actually mapped to my intended semantics. There are two lists, A and B, and I want to rearrange B so that it is in the same relative order as A - the maximum element of B is in the same position as the current position of the maximum element of A, and the same for the minimum element, and so on. Note that A is not sorted, nor do I want it to be. As an example, if the following were input: a = [7, 14, 0, 9, 19, 9] b = [45, 42, 0, 1, -1, 0] I want the output to be [0, 42, -1, 0, 45, 1]. Please note that the intended output is not [0, 45, 1, 0, 42, -1], which is what it would be it you zipped the two and sorted by A and took the resulting elements of B (this is what all of the other questions I looked at wanted). Here's my code: def get_swaps(x): out = [] if len(x) <= 1: return out y = x[:] n = -1 while len(y) != 1: pos = y.index(max(y)) y[pos] = y[-1] y.pop() out.append((pos, n)) n -= 1 return out def apply_swaps_in_reverse(x, swaps): out = x[:] for swap in swaps[<IP_ADDRESS>-1]: orig, new = swap out[orig], out[new] = out[new], out[orig] return out def reorder(a, b): return apply_swaps_in_reverse(sorted(b), get_swaps(a)) The approach is basically to construct a list of the swaps necessary to sort A via selection sort, sort B, and then apply those swaps in reverse. This works, but is pretty slow (and is fairly confusing, as well). Is there a better approach to this?
80c405dd6141c21ce805c7be2a4886415ebcf2e55724fca532b14db90facb4ec
['6e3771844b504801b092c3a7790b9b16']
I've used lsl and lsr a bit in THUMB (an instruction set for ARM), and the way they worked was tied to the number of bits in the registers. In my particular case, it happened to be 16bit registers, but that's not overly important, and for the purposes of example, I'm going to pretend that they were only 4bit. Basically, their behavior is this: mov r0, #0x1011 lsl r0, #0x1 The mov would set r0 to 1000, and then the lsl would shift them, but because the number inside r0 is already 4bits, and, as I said earlier we're pretending we're working with 4bit registers, that bit is lost, and r0 would become #0x0110. Basically what happens is, to lsl something by n bits, the n most significant bits are lost, the rest of the value is shifted as expected, and 0s are added to fill in the least significant bits. This probably has a name, sorry, I don't know what it is, but hopefully what I'm referring to is clear enough. I'm working with the << operator in Python, and I need this to happen. Practically, I need to split up a 16bit number into it's most significant 3 bits, next most significant 2 bits, etc. Is there a simple way to handle this that's already built into Python? I know a way to do it, but rather than bothering with that, I figured it'd be worth asking if such a feature was built in. Thanks.
28fd93ea7fbeb58d1b35c7f482bd5af1742006fbf3675e5d791fa1f595c333f3
['6e3ce907e1ff4c50b70d7aa508aa90a6']
The question is fairly simple. There is a set {2,4,6}. The expected answer is all possible permutations to get the number 6. So, the answer will be:- { 2,2,2} , {2,4} , {4,2} , {6} What I've tried:- I'm trying to approach this problem using the popular "coin change" question. But in coin change permutations are not there. Means {2,4} and {4,2} are regarded as same. Here's my code. It doesn't account permutations. public static int NumberOfWays(int sum) { int [][] memMatrix = new int [7][sum+1]; for (int i = 2 ; i <= 6 ; i += 2) { for (int j = 0 ; j <= sum ; j += 2) { if (i == 2) { //using only 2 , there is only 1 way to get the sum memMatrix[i][j] = 1; } else if ( i > j) { //if total sum is less than the newly used denomination , then the number of ways will always remain same memMatrix[i][j] = memMatrix[i - 2][j]; } else { //if this is the case then need to calculate without using the denomination + using the denomination memMatrix[i][j] = memMatrix[i - 2][j] + memMatrix[i][j - i]; } } } for (int i = 2 ; i <= 6 ; i += 2) { for (int j = 2 ; j <= sum ; j += 2) { System.out.print(memMatrix[i][j]+" "); } System.out.print("\n"); } return memMatrix[6][sum]; } Here's the output that I get along with the matrix. How can I account permutations also? 1 1 1 1 2 2 1 2 3 The number of ways to get 6 = 3
d5fbaf6fc54057a33ef6568bff29581ec3f0280ca57601e1f74b08351447b9f5
['6e3ce907e1ff4c50b70d7aa508aa90a6']
I got the solution. It's pretty straightforward. The code is commented. It might require a little bit of tracing. #include <bits/stdc++.h> using namespace std; // Function to find the total number of ways to get change of N from // unlimited supply of coins in set S int count(int S[], int n, int N) { // if total is 0, return 1 if (N == 0) return 1; // return 0 if total become negative if (N < 0) return 0; // initialize total number of ways to 0 int res = 0; // do for each coin for (int i = 0; i < n; i++) { // recuse to see if total can be reached by including // current coin S[i] res += count(S, n, N - S[i]); } // return total number of ways return res; } // main function int main() { // n coins of given denominations int S[] = { 1, 2, 3 }; int n = sizeof(S) / sizeof(S[0]); // Total Change required int N = 4; cout << "Total number of ways to get desired change is " << count(S, n, N); return 0; }
40dd76ea6a216e3bafc985802dca7eb52576da47a697c6b7361152e099dd97ad
['6e3fa99e9de241abb89ab4ff6f577b04']
Lets imagine this architecture: model: get record and joined records controller: iterating through all the records, and doing some calculations, statistics calculations even formatting dates etc view: show it is it good? I guess not. But model only may deal with data retrieving - not formatting. Controller cant do that either. Where to do the "iterating through all the records, and doing some calculations, statistics calculations even formatting dates etc" part?
7e1d960ac8d37ff70de99e6b4133276d5ac048474f79368edfdd4813bd04389b
['6e3fa99e9de241abb89ab4ff6f577b04']
so, I want to do a "mobile" friend view of my site. Its liquid designed already, but mobiles need definitely different look. Now, how to detect if I visited it with mobile (iphone, ipad, android)? More specifically, I imagine it as if the screen width is smaller than a value (dunno that value), then thats considered a mobile client. How to detect, so that generate the mobile optimized CSS/HTML outputs? Maybe im too simple, but to me mobile client = smaller screen, and nothing more
cf0efc6a6f715ee183df6fd38074949d616ca877c275ffab7fb780b2ef893340
['6e452657a0db4fbf93cf352c1f227edc']
i would like to add a recaptcha to my web form and have been following the instructions on the web but i just can't get the image to display. i followed these steps: - downloaded and unzipped the recaptcha folder - uploaded recaptchalib onto my root folder (server side) - made an account on recaptcha site - copied the public and private key to paste into my php code - i pasted the php code into my html code like this: <form method="post" name="contact_form" action="contactengine.php"> <table> <tr> <td> <label for="Name">Name </label> </td> <td> <input id="Name" name="Name" type="text" maxlength="300" value=""/ > </td> </tr> <tr> <td> <label for="Email">Email </label> </td> <td> <input id="Email" name="Email" type="text" maxlength="300" value=""/ > </td> </tr> <td class="buttons"> <input type="hidden" name="form_id" value="" /> <?php require_once('recaptchalib.php'); // reCAPTCHA Library $pubkey = "public-key-here"; // Public API Key echo recaptcha_get_html($pubkey); // Display reCAPTCHA ?> <input type="submit" name="submit" value="Submit" class="submit-button" /> </td> </tr> </table> </form> this should at least display the recaptcha image, but i just cannot get it to display. i tried making an index.php and pasting my in there, but that doesn't even display a thing. It should be so simple and yet i must be missing something. It's driving me crazy. Help will be much appreciated, thanks B
2cb9b10822f0738c7f1c6e011ed3dc35dafc2a34a45fe0d9f67db1b1473df7e5
['6e452657a0db4fbf93cf352c1f227edc']
i'm looking to resize my images in my image slider automatically to fit the browser window while keeping my image size as low as possible. The images itself have a fixed width of 800px but when the browser window scales to more than that the images don't scale along. They stay a fixed 800px. Is there a way to resolve that. You can see an example at: http://www.continuous-ltd.be/ctb-site/indextest.html thx
af3395a22be5dd043c35357c6f969df3fad6879eb4b8891dc0a12c4af3d1948e
['6e60f0624e3b4f90894655029b9da8a6']
<PERSON> vou passar um exemplo bem simples de como disparar e ouvir eventos de diferentes contextos, será descrito o que fazer em cada contexto. CONTEXTO - Serviço do componente do botão verde: import { EventEmitter } from '@angular/core'; //import necessario public eventoEmit = new EventEmitter<boolean>(); // seu emissor de evento public Click_BotaoVerde() { //demais ações this.eventoEmit.emit(true); // emitindo o evento } CONTEXTO - Component menu constructor(private _btnVerdeService: BtnVerdeService){ this._btnVerdeService.eventoEmit.subscribe(x => { // Aqui você já esta ouvindo os eventos do btn verde }); }
a3f686ef0fa08930f3d3173bfd45228fe1c68f0ba92544243a36bcfb14fea750
['6e60f0624e3b4f90894655029b9da8a6']
Para isso você deve instalar um pacote de extensão que faz esse tratamento do CORS. No console do NUGET digite o seguinte comando: Install-Package Microsoft.AspNet.WebApi.Cors Em seu arquivo WebApiConfig coloque o código config.EnableCors(); : public static class WebApiConfig { public static void Register(HttpConfiguration config) { // Configurando o CORS config.EnableCors(); config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); } } Em sua controller <PERSON> atributo: [EnableCors(origins: "https://sandbox.pagseguro.uol.com.br", headers: "*", methods: "*")] ou para futuras chamadas, considerando chamadas de todas origens: [EnableCors(origins: "*", headers: "*", methods: "*")]
eccf4079942fac0d3ec0fc5e1d5b28bcabff9da8389614ca7af6da62b17d647b
['6e70435aa22e46ec8adc5087527ef17b']
Maybe you are not setting the correct security domain "quark"? This can be done using a jboss-web.xml or using the org.jboss.ejb3.annotation.SecurityDomain annotation. <?xml version="1.0" encoding="UTF-8"?> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_6_0.xsd" version="7.1"> <context-root>/ctxroot</context-root> <security-domain>quark</security-domain> </jboss-web>
ee8d5979bd9c4ba7cd1c1f4ba25a72dd2167e7ceed13a140913e9246e020e14c
['6e70435aa22e46ec8adc5087527ef17b']
In sitelets it's rather easy to create links to other endpoints with parameters. For example ctx.Link(EndPoint.ShowUser user.id)) creates a link to the ShowUser endpoint with a specific ID. Now I'm migrating some code to the client side to dynamically update a table once a new item is created; the table has action links that point to other endpoints. Is there something like ctx.Link on the client side I can use? I'd rather avoid creating the link by myself (e.g. with sprintf) because I want the EndPoint type to be authorative for everything URL related.
f5775d70f770e55a0aab49143bcd01895d098c8a08fe5b85a232aac10f088cdf
['6e75212dcb094b5fafcc567c27709348']
The idea is to partition the nodes into groups of 2 or 3, so that any two nodes within a group are connected by an edge. For example, try grouping the nodes like the following (the nodes with same color are in the same group): Can you argue from here that every group can have at most 1 node colored black?
673407381a1fd341ceccb7bd6da265b66a213aab34afbf1618e82c4f61b7725a
['6e75212dcb094b5fafcc567c27709348']
Direct element-chasing: If $x \in \cup_{n=1}^\infty A_n \setminus \cup_{n=1}^\infty E_n$, then $x \in \cup_{n=1}^\infty A_n$ and $x \notin \cup_{n=1}^\infty E_n$. So there is $N$ such that $x \in A_N$ and then of course $x \notin E_N$. Thus $x \in A_N \setminus E_N \subset \cup_{n=1}^\infty \left( A_n \setminus E_n \right)$.
68cab65e887728cd1b19d1656de7223e684d5389ac0f5b8ab6be18d91e5a702d
['6e91934459244313a4f37b80e7fd9545']
Each project in Visual Studio has a "treat warnings as errors" option. Go through each of your projects and change that setting: Right-click on your project, select "Properties". Click "Build". Switch "Treat warnings as errors" from "All" to "Specific warnings" or "None". The location of this switch varies, depending on the type of project (class library vs. web application, for example).
2acc0f7545b3f9b6a964f8f3d6cb0b57f9096a3631e4e7e5011c718e6ce26bb4
['6e91934459244313a4f37b80e7fd9545']
RESTORE cannot process database 'StoreDataBase' because it is in use by this session. It is recommended that the master database be used when performing this operation. This tells you what you need to know. You cannot perform a restore on a database when you're using it in your session. Use another database - master, as the error message recommends, is a good choice. Change your connection string accordingly. server = .\SQLEXPRESS; DataBase=master; Integrated Security=true
8d795553e74f51ac3e39479bf855ec65b316914f71103effcd7978533d02e89e
['6e9a7ebb346f4952bf42c1fae18b2066']
I'm trying to write a jQuery function to take the visible h3 tags' text and append them to a side menu. I've got the text appearing in the menu correctly, but I cannot strip, then wrap them in the tags I want. I have included the code below, can anyone see why the wrapping is not working? function populateRightMenu() { // empty existing menu right-menu-list $('#right-menu-list').empty(); // get list of h3 var items = $('h3:visible'); // inject into menu $(items).clone().unwrap('h3').wrap('<li></li>').appendTo('#right-menu-list'); }
3c805249c4dfb114376544f46d7b6bf1fb1dd3d1c8978203c1bcfa2376f5f3b4
['6e9a7ebb346f4952bf42c1fae18b2066']
Hi I have a navbar as follows: <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top back-to-top"> <div class="container-fluid"> <a href="https://www.google.com"><img class="logo" alt="logo" src="assets/Logos/ntc_white_basic.svg"></a> <a class="navbar-brand" href="index.html">Test Navbar</a> </div> </nav> With a JavaScript function to return to the top of the page when the navbar is clicked as follows: $('.back-to-top').click(function () { $('html, body').animate({ scrollTop: 0 }, 'slow'); return false; }); However, I still want to be able to follow the links within the navbar but they are being overridden by the JS function so when you click on them now it scrolls to the top. How do I make it so the links within the navbar are still useable but the 'back-to-top' function works when you click on the rest of the navbar, thanks.
4c737ad5a68e301ca58ed851e8638610ceb622755f592ab9a772f5140e4227d6
['6e9ab858c474425fa47925c72828cdf4']
Hello guys I am having problem when I try to run my discord.js code its not showing any out put it just shows this when I run code(I am using VS Code) On running on vs code (with the Code Runner package) [Running] node "d:\Red\Bot Devlopment Javascript\Src\index.js" [Done] exited with code=0 in 0.085 seconds On running on cmd d:\Red\Bot Devlopment Javascript\Src My Bot Code const Discord = require('discord.js') const client = new Discord.Client() const config = require('./config.json') client.on('ready', () => { console.log('The client is ready!') }) client.login(config.token) Please help me where should I run my code or is there a problem in code itself
b00feec2e27b054404c79759876e26863edafd762efd162baaffdcf16c95827e
['6e9ab858c474425fa47925c72828cdf4']
Hello everyone I am making a discord bot in discord.py using python 3.8. I have make some cogs and its not showing any issue bot whenever I type the load cog command or unload cog command its shows command not found. Only one of my cog is working another is not working please help me. My Bot.py(main file) import discord import os from discord.ext import commands from discord.ext.commands import CommandNotFound client = commands.Bot(command_prefix = '#') @client.command async def load(ctx, extension): client.load_extension(f'cogs.{extension}') @client.command async def unload(ctx, extension): client.unload_extension(f'cogs.{extension}') for filename in os.listdir('./cogs'): if filename.endswith('.py'): client.load_extension(f'cogs.{filename[:-3]}') client.run('BOT TOKEN') My First cog file main.py import discord from discord.ext import commands class main(commands.Cog): def __init__(self, client): self.client = client #Events @commands.Cog.listener() async def on_ready(self): print('Bot is online.') # Commands @commands.command(name='ping',help='Sends the latency of the Bot') async def ping(self, ctx): await ctx.send(f'**Pong!** Latency: {round(self.client.latency * 1000)}ms') def setup(client): client.add_cog(main(client)) My 2 cog file moderation.py import discord from discord.ext import commands class moderation(commands.Cog): def __init__(self, client): self.client = client @commands.command(name='clear', help='deletes no. of messages you give it') async def clear(ctx, amount = 1000): await ctx.channel.purge(limit=amount) def setup(client): client.add_cog(moderation(client))
19cb13bc9f1cf568529f88ee62a714fc8a153be54950b75317d8dbb36d71a70c
['6ebc63b38a814771a05ed684b0483f13']
you must using Uri.parse(namepath.getAbsoultePath); this is my code and actually working File root = Environment.getExternalStorageDirectory(); String location = "/" +textTitle.getText().toString()+random+"mycarta.png"; String path = root.toString() + location; File imageDir = new File(root,location); and use imageDir on the Intent.EXTRA_STREAM , like below : Intent i = new Intent(); i.setAction(Intent.ACTION_SEND); i.setType("image/png"); i.putExtra(Intent.EXTRA_TEXT, shareMessages); i.putExtra(Intent.EXTRA_STREAM, Uri.parse(imageDir.getAbsolutePath())); i.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); startActivity(Intent.createChooser(i,"Share"));
3c1cb6beac3423d418a7a5c2c50cfc65a1104cd8f4b647fc21c250ed1e4641df
['6ebc63b38a814771a05ed684b0483f13']
im trying to set hidden widget ListTile if SharedPreferences Getting Null Data , i have try to using Visibility and i getting error like this type 'Future' is not a subtype of type 'Widget' My Widget build(BuildContext context) Widget build(BuildContext context) { return new Drawer( child: new ListView( children: <Widget>[ new DrawerHeader( child: new Text("Menu"), decoration: new BoxDecoration(color: Colors.lightBlueAccent), ), new ListTile( title: new Text("Profile"), onTap: () { Navigator.pop(context); Navigator.push( context, new MaterialPageRoute( builder: (context) => new ProfileScreen())); }, ), new ListTile( title: new Text("Proposal List"), onTap: () { visibleMethod(); }, ), //MY PROBLEM HERE Visibility( visible: true, child: listTileAju()), new ListTile( title: new Text("Sign Out"), onTap: () async { SharedPreferences pref = await SharedPreferences.getInstance(); pref.remove("authorization"); pref.remove("is_login"); Navigator.pushReplacement(context, MaterialPageRoute(builder: (BuildContext ctx) => LoginPage())); }, ), ], )); } And My Widget listTileAju() listTileAju() async { SharedPreferences pref = await SharedPreferences.getInstance(); setState(() { roleAju = (pref.getStringList('role_aju') ?? 'Something Went Wrong'); }); if (roleAju != null) { Visibility( visible: true, child: new ListTile( title: new Text("Aju List"), onTap: () { Navigator.pop(context); Navigator.push(context, new MaterialPageRoute(builder: (context) => new AjuScreen())); }, ), ); } else { Visibility( visible: false, child: new ListTile( title: new Text("Aju List"), onTap: null, ), ); } } And i hope the widget ListTile can be Hidden if SharedPreferences Getting Null Data
b8ef69f2e69625aa8190d0cf103b31aa959a4c2d9cc6a2246acdac9da5200388
['6ee26401976942daa0747a41c83bb929']
In case anyone lands on this (like I did) because it isn't working with LESS, here's what I had to do: .field_with_errors .form-control { &:extend(.has-error .form-control); } .field_with_errors .form-control:focus { &:extend(.has-error .form-control:focus); } When I tried it with: .field_with_errors { &:extend(.has-error); } which is the equivalent of the recommended way I found to use the bootstrap 3 style for errors, LESS wasn't doing anything. It may have something to do with the fact that the selectors in bootstrap 3 that mention has-error always have it combined with something else, e.g.: .has-error .form-control { Anyway - the above solution worked for me so hopefully it helps someone else.
61e447cb97ea872248ab44938275189ab1a33d4925a9dfed5d82ee698f4071d3
['6ee26401976942daa0747a41c83bb929']
If you are only getting this problem in the simulator, then it may be that you need to restart the simulator. I've noticed lately that the simulator will sometimes cause all HTTP requests to error out with that for no reason and only restarting it clears the issue. Also, I have found that some HTTP errors can end up with a nil localizedDescription on the error object. What are you seeing on the NSLog line where you print that out?
15d0f39d1f1090b6df16a871c9fd4fc461d8dec6fac610460e941a4f9ccc74c5
['6eed158d99ff4a6fbc38a96fe0de0686']
The answer is no, since the code was signed using a certificate that sooner or later will expire. Using a CA code signing cert (example: DigiCert.com) will maintain the signed files valid for life when adding "timestamp" to sign the jar file(s). Any OS or browser will automatically trust the source (your organization) because a valid CA issued it (DigiCert). The pre-loaded root certs link to the code signing cert even after the code signing order expired. CA's will update their Root Certs a few years before it expires.
f50f734235ad227231fe8b36990ad612bdb824dc9965c05683b74153c836ab5f
['6eed158d99ff4a6fbc38a96fe0de0686']
A self signed cert and a CA certificate are basically the same thing. They all need the a CSR and a private key in order for them to function. Replacing the cert on Apache is very simple. Just go to your httpd config file and point to the new Private key, Domain Cert, and Intermediate Cert. Restart the service and finish!
e451a5bccb1526fe25d718049b2b7cb79f30c1ccd95e7fd9302515582d48d7a7
['6f0aed970288482284a29276523c68e6']
i am writing a programme to access the array list of form 1 in form 2.in following programme i am able to access it but in form 2 the array list (of form 1)that i am accessing is showing blank.what can be the reason for this? The programme for form1 is as follows: public partial class Form1 : Form { public ArrayList hop = new ArrayList(); public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { hop.Add("2016"); hop.Add("2015"); Form2 f = new Form2(); f.checkedListBox2.Text = this.textBox1.Text; f.Show(); } } for form 2 as follows: public partial class Form2 : Form { ArrayList hop2 = new ArrayList(); public Form2() { InitializeComponent(); } private void Form2_Load(object sender, EventArgs e) { hop2.Add("2016"); Form1 fp = new Form1(); // fp.hop.Add("kite"); if (hop2[1] == fp.hop[1]) MessageBox.Show("equal"); else MessageBox.Show("not equal"); } }
214073dd05b7299e320a0d2277ecf29c7bee234cf735050b8f1e9f77b19b11d0
['6f0aed970288482284a29276523c68e6']
I am working on a GSM based tracking device . i have successfully able to plot the approximate location on google maps using Gmap.net library for windows application and google maps api for android application.I want to mainly do the tracking of the Rail coach .with my current device i gets the approximate location near the railway track.I want to shift that Location /Maker on the near by Rail track.i need help and suggestions on how to achieve this task.please help.
db8a48f9fc93dfa20aea352900b26b39fb18d7cf7b5c3f6b884750367d07ec25
['6f0af1b4a93347418bfad76dd004bcef']
I have an ASP.NET web form application using 4.5.2 framework. Chrome's latest update seems to eliminated the ability for my application to clear the cookies. I know the SameSite attribute can be added to framework versions 4.7.2 and greater but I am not having any luck finding anything that works for older versions. Does anyone have a simple solution to bring back clearing cookies so my application will work correctly? What are my options around this? I've tried adding rewrite rules in my config, but didnt have any luck with that. Any help is appreciated.
50266a200e85719eb1c9575d597bec1c532256dc08194e7cf41574567125da12
['6f0af1b4a93347418bfad76dd004bcef']
I have a panel on a windows form. A form is loaded into the panel based off what button they click. One of these forms that's loaded into the panel has a tab control. The background of the form is an image and every time i switch between tabs, the form flickers. When I set the background image to nothing or a solid color, it works fine so it has to be the image. Is there any way around this? Thanks in advance.
f46df1178b7303e6e44a3059789af17c9a0ad22540ea41ea501b33596cf31a91
['6f18e2b52bae44998af531f4f6f4c9f8']
I guess my main beef is that someone quickly scanning my resume will assume I’m a student with no work experience. Of course reading further will correct that assumption, but I’d hate for them to not read further. What about something like, ‘staff research assistant? Not sure that sounds any better from a professional standpoint, but perhaps it would dispel the initial ‘oh, this person is a student’ reaction?
819462fee54323059769381005b0b5845cad32aaa957dc78b139bf83809c8729
['6f18e2b52bae44998af531f4f6f4c9f8']
I had a problem at one point with finalizers going off sooner than expected, because I didn't fully understand the interplay between finalizers, the garbage collector, and when a local object is considered collectible (hint: it's not at the closing curly brace of the block). If your code uses finalizers, you may wish to look into GC.KeepAlive(). In the following block: void MyFunction() { Foo f = new Foo(); SomeFunction(f.SomeProp); } f becomes eligible for finalization before SomeFunction() even runs! If the finalizer does something like dispose whatever SomeProp hands out, you could get into trouble. Adding a call to GC.KeepAlive(f) after the call to SomeFunction ensures that f isn't eligible for finalization until after the call to KeepAlive(). Edit: After all that, I forgot to point out that this problem was much more pronounced when running in Release mode. I don't know if the Debug build puts implicit KeepAlives for locals at the end of the function for the debugger's benefit, or if the garbage collection is simply less aggressive, or what, but Release mode exacerbated this problem greatly in my case.
dbc0a9ff3d0bf1bc54fc066dac1d4ca2267d0bb8da44c3eab1891be4b3d59ded
['6f444d60410949d79d6d11bfb4a52926']
This was a theme issue. The user had changed his Windows 7 theme and broke those images. I noticed that an MSE popup was not the color that it should have been and the sticky notes that he had on his desktop were white in the middle when they should have been yellow all the way through. I set the theme back to Windows 7 (the default) and it fixed the issue. I don't know what happened when he changed it back, but ultimately the theme was the issue I don't have any idea why
cbe6737dd26573b75df9afb7d93873e5a86bb15249bd90cb6ec856ec75f5d433
['6f444d60410949d79d6d11bfb4a52926']
I can send a bunch of documents as attachments and have Amazon convert these documents and send them to my Kindle. I do it all the time for .doc and .pdf files. But what if there's a long email or article I want to read on my Kindle? I don't want to have to open up Word, copy the article text to the document, save it, open up gmail, attach the .doc to the email, send it to the correct address, wait.... Is there a way that I can automate this process? Is there a 'Read It Later' style bookmarklet or something that I can just click to send to my Kindle?