text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Cloudflare, Fastly, Mozilla and Apple working on SNI encryption for TLS 1.3. | 1cybersec
| Reddit |
How much business logic should the database implement?. <p>I've worked in some projects where most of the business logic was implemented on the database (mostly through stored procedures). On the other side, I've heard from some fellow programmers that this is a bad practice ("Databases are there to store data. Applications are there to do the rest").</p>
<p>Which of these approaches is the generally better?</p>
<p>The pros of implementing business logic in the DB I can think of are:</p>
<ul>
<li>Centralization of business logic;</li>
<li>Independency of application type, programming language, OS, etc;</li>
<li>Databases are less prone to technology migration or big refactorings (AFAIK);</li>
<li>No rework on application technology migration (e.g.: .NET to Java, Perl to Python, etc).</li>
</ul>
<p>The cons:</p>
<ul>
<li>SQL is less productive and more complex for business logic programming, due to the lack of libraries and language constructs the most application-oriented languages offer;</li>
<li>More difficult (if possible at all) code reuse through libraries;</li>
<li>Less productive IDEs.</li>
</ul>
<p>Note: The databases I'm talking about are relational, popular databases like SQL Server, Oracle, MySql etc.</p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
Can't "wget" from my home Debian Lenny server! But the ports are opened!. <p>I have a very strange problem for me.
In this example dns and IP is hiden for security reason.
When I try from putty manager to connect to my Debian and write next command:</p>
<pre><code> debian:~# wget http://myhost.no-ip.org:1082/archive.tar
--2011-04-03 03:35:27-- http://myhost.no-ip.org:1082/archive.tar
Resolving myhost.no-ip.org... xx.10x.66.xxx
Connecting to myhost.no-ip.org|xx.10x.66.xxx|:1082... failed: Connection timed out.
Retrying.
--2011-04-03 03:38:42-- (try: 2) http://myhost.no-ip.org:1082/cccam.tar
Connecting to myhost.no-ip.org|xx.10x.66.xxx|:1082... failed: Connection timed out.
Retrying.
--2011-04-03 03:41:53-- (try: 3) http://myhost.no-ip.org:1082/cccam.tar
Connecting to myhost.no-ip.org|xx.10x.66.xxx|:1082... failed: Connection timed out.
Retrying.
</code></pre>
<p>..I can't connect to my Debian server! This message stay till I press ctrl+z.</p>
<p>But when I try to wget any other site it working!
Very strange thing is when I type:</p>
<pre><code>http://myhost.no-ip.org:1082/archive.tar
</code></pre>
<p>command in my firefox web browser the file is reachable and download is strated.
So, my port is open. Am I right?
What can be the problem?
Here is my config from networking :</p>
<pre><code>debian:~# cat /etc/networking/interfaces
cat: /etc/networking/interfaces: No such file or directory
debian:~# cat /etc/network/interfaces
### The loopback network interface
auto lo
iface lo inet loopback
###The primary network interface
allow-hotplug eth1
auto eth1
iface eth1 inet static
address 192.168.50.111
netmask 255.255.255.0
broadcast 192.168.50.255
gateway 192.168.50.99
debian:~#
</code></pre>
<p>The archive.tar file is putted to /vat/www/archive.tar
Local port 80 is forwared in my router to external port 1082
My no.ip dns address is vaild and reachable through firefox.
Have someone any suggestion what coud be a problem?
Thx.</p>
<p>..I can't connect to my Debian server! This message stay till I press ctrl+z.</p>
<p>But when I try to wget any other site it working!
Very strange thing is when I type:</p>
<pre><code>http://myhost.no-ip.org:1082/archive.tar
</code></pre>
<p>command in my firefox web browser the file is reachable and download is strated.
So, my port is open. Am I right?
What can be the problem?
Here is my config from networking :</p>
<pre><code>debian:~# cat /etc/networking/interfaces
cat: /etc/networking/interfaces: No such file or directory
debian:~# cat /etc/network/interfaces
### The loopback network interface
auto lo
iface lo inet loopback
###The primary network interface
allow-hotplug eth1
auto eth1
iface eth1 inet static
address 192.168.50.111
netmask 255.255.255.0
broadcast 192.168.50.255
gateway 192.168.50.99
debian:~#
</code></pre>
<p>The archive.tar file is putted to /vat/www/archive.tar
Local port 80 is forwared in my router to external port 1082
My no.ip dns address is vaild and reachable through firefox.
Have someone any suggestion what coud be a problem?
Thx.</p>
| 0non-cybersec
| Stackexchange |
This guy is just as excited as we are for our first family backpacking trip this summer.. | 0non-cybersec
| Reddit |
Write all exception in file. <p>I'm using Timber to write some logs to file which located on device. For now, I'm writing my selected logs and some response from server using HTTP interceptor. But I want to write in file all exception (fatal, for example). Is it possible with Timber or other library?</p>
<p>For now I'm using Fabric, but my app not always have internet connection with outer world</p>
<p>P.S. I want to write ALL fatal exception without try/catch</p>
<h2>TimberLooger.class</h2>
<pre><code>public class FileLoggingTree
{
/**
* Sends an error message to LogCat and to a log file.
* @param context The context of the application.
* @param logMessageTag A tag identifying a group of log messages. Should be a constant in the
* class calling the logger.
* @param logMessage The message to add to the log.
*/
public static void e(Context context, String logMessageTag, String logMessage)
{
if (!Log.isLoggable(logMessageTag, Log.ERROR))
return;
int logResult = Log.e(logMessageTag, logMessage);
if (logResult > 0)
logToFile(context, logMessageTag, logMessage);
}
/**
* Sends an error message and the exception to LogCat and to a log file.
* @param context The context of the application.
* @param logMessageTag A tag identifying a group of log messages. Should be a constant in the
* class calling the logger.
* @param logMessage The message to add to the log.
* @param throwableException An exception to log
*/
public static void e
(Context context, String logMessageTag, String logMessage, Throwable throwableException)
{
if (!Log.isLoggable(logMessageTag, Log.ERROR))
return;
int logResult = Log.e(logMessageTag, logMessage, throwableException);
if (logResult > 0)
logToFile(context, logMessageTag,
logMessage + "\r\n" + Log.getStackTraceString(throwableException));
}
// The i and w method for info and warning logs
// should be implemented in the same way as the e method for error logs.
/**
* Sends a message to LogCat and to a log file.
* @param context The context of the application.
* @param logMessageTag A tag identifying a group of log messages. Should be a constant in the
* class calling the logger.
* @param logMessage The message to add to the log.
*/
public static void v(Context context, String logMessageTag, String logMessage)
{
// If the build is not debug, do not try to log, the logcat be
// stripped at compilation.
if (!BuildConfig.DEBUG || !Log.isLoggable(logMessageTag, Log.VERBOSE))
return;
int logResult = Log.v(logMessageTag, logMessage);
if (logResult > 0)
logToFile(context, logMessageTag, logMessage);
}
/**
* Sends a message and the exception to LogCat and to a log file.
* @param logMessageTag A tag identifying a group of log messages. Should be a constant in the
* class calling the logger.
* @param logMessage The message to add to the log.
* @param throwableException An exception to log
*/
public static void v
(Context context,String logMessageTag, String logMessage, Throwable throwableException)
{
// If the build is not debug, do not try to log, the logcat be
// stripped at compilation.
if (!BuildConfig.DEBUG || !Log.isLoggable(logMessageTag, Log.VERBOSE))
return;
int logResult = Log.v(logMessageTag, logMessage, throwableException);
if (logResult > 0)
logToFile(context, logMessageTag,
logMessage + "\r\n" + Log.getStackTraceString(throwableException));
}
// The d method for debug logs should be implemented in the same way as the v method for verbose logs.
/**
* Gets a stamp containing the current date and time to write to the log.
* @return The stamp for the current date and time.
*/
private static String getDateTimeStamp()
{
Date dateNow = Calendar.getInstance().getTime();
// My locale, so all the log files have the same date and time format
return (DateFormat.getDateTimeInstance
(DateFormat.SHORT, DateFormat.SHORT, Locale.CANADA_FRENCH).format(dateNow));
}
/**
* Writes a message to the log file on the device.
* @param logMessageTag A tag identifying a group of log messages.
* @param logMessage The message to add to the log.
*/
private static void logToFile(Context context, String logMessageTag, String logMessage)
{
try
{
// Gets the log file from the root of the primary storage. If it does
// not exist, the file is created.
File logFile = new File(Environment.getRootDirectory(),
"TestApplicationLog.txt");
if (!logFile.exists())
logFile.createNewFile();
// Write the message to the log with a timestamp
BufferedWriter writer = new BufferedWriter(new FileWriter(logFile, true));
writer.write(String.format("%1s [%2s]:%3s\r\n",
getDateTimeStamp(), logMessageTag, logMessage));
writer.close();
// Refresh the data so it can seen when the device is plugged in a
// computer. You may have to unplug and replug to see the latest
// changes
MediaScannerConnection.scanFile(context,
new String[] { logFile.toString() },
null,
null);
}
catch (IOException e)
{
Log.e("com.cindypotvin.Logger", "Unable to log exception to file.");
}
}
}
</code></pre>
<h2>TimberLogger.class</h2>
<pre><code>public class TimberLooger extends Timber.DebugTree {
private static final String TAG = FileLoggingTree.class.getSimpleName();
private Context context;
public TimberLooger(Context context) {
this.context = context;
}
@Override
protected void log(int priority, String tag, String message, Throwable t) {
try {
File direct = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/FileLocation");
if (!direct.exists()) {
direct.mkdir();
}
String fileNameTimeStamp = new SimpleDateFormat("dd-MM-yyyy", Locale.getDefault()).format(new Date());
String logTimeStamp = new SimpleDateFormat("E MMM dd yyyy 'at' hh:mm:ss:SSS aaa", Locale.getDefault()).format(new Date());
String fileName = fileNameTimeStamp + ".html";
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/FileLocation" + File.separator + fileName);
file.createNewFile();
if (file.exists()) {
OutputStream fileOutputStream = new FileOutputStream(file, true);
fileOutputStream.write(("<p style=\"background:lightgray;\"><strong style=\"background:lightblue;\">&nbsp&nbsp" + logTimeStamp + " :&nbsp&nbsp</strong>&nbsp&nbsp" + message + "</p>").getBytes());
fileOutputStream.close();
}
//if (context != null)
//MediaScannerConnection.scanFile(context, new String[]{file.getAbsolutePath()}, null, null);
} catch (Exception e) {
Log.e(TAG, "Error while logging into file : " + e);
}
}
}
</code></pre>
| 0non-cybersec
| Stackexchange |
What is `tic` and what can I do about it using 100% CPU?. <p>I have a process named <code>tic</code> that occasionally shows its ugly face in <code>htop</code> or Activity Monitor, consuming around 100% CPU. I couldn't find any good info on it last time I tried. What is it for, what would make it suck up my processor cycles, and what can be done about it. </p>
<p>I'm on the latest sub-version of Mojave: 10.14.3 (18D42).</p>
<p>Update: this happened again, and about 80% of the lines displayed by <code>sudo lsof -p PID</code> were related in some way to Visual Studio Code. I don't know if that's a useful clue for anyone about the cause... but I'll put it out there...</p>
| 0non-cybersec
| Stackexchange |
Why can't this specific device be enumerated by UsbManager.getDevicesList()?. <p>As the title states, I am having troubles enumerating a specific USB device on a USB capable Android phone using UsbManager.getDeviceList(). I've had no trouble enumerating and communicating with other USB devices on this and other phones, but this specific USB device cannot be found. It also cannot be enumerated with 3rd party apps such as <a href="https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator&hl=en" rel="nofollow noreferrer">USB Device Info</a>.</p>
<p>Below are the USB properties enumerated properly on a PC. I've communicated with the device manufacturer who has confirmed that an outside firm certified the device followed the USB 2.0 spec. Originally, my suspicion was that the device was rejected by Android because it omitted the following fields: iManufacturer, iProduct, and iSerialNumber, which were included by other compliant devices. However, it seems these fields aren't necessary after reviewing this excerpt from Section 9.5 of the <a href="http://www.usb.org/developers/docs/usb20_docs/" rel="nofollow noreferrer">USB 2.0 Spec</a>:</p>
<blockquote>
<p>Where appropriate, descriptors contain references to string descriptors that provide displayable information describing a descriptor in human-readable form. The inclusion of string descriptors is optional. However, the reference fields within descriptors are mandatory. If a device does not support string descriptors, string reference fields must be reset to zero to indicate no string descriptor is available.</p>
</blockquote>
<p>My question, then, is what is causing the UsbManager to reject enumeration of this USB device? And, more importantly, is there anything I can do about it to force Android to enumerate this device? Ideally, I am most interested in a solution that does not require root access, but it is not necessarily a deal-breaker.</p>
<p><a href="https://i.stack.imgur.com/qRIIC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qRIIC.png" alt="USB properties"></a></p>
<hr>
<p>EDIT: Some sample code.</p>
<pre><code>UsbManager usbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> deviceList = usbManager.getDeviceList();
// When I plug in this USB device, deviceList is empty.
// Other devices are discoverable, however.
</code></pre>
<hr>
<p>EDIT 2: I've tested with some more phones. I have successfully enumerated the USB device with the following phones:</p>
<ul>
<li>Note 2</li>
<li>LG-V400</li>
</ul>
<p>The following devices could not enumerate the device:</p>
<ul>
<li>Nexus 5</li>
<li>Galaxy S4, S5, S6</li>
<li>LG G2, 4G LTE</li>
</ul>
<hr>
<p>EDIT 3: <a href="https://gist.github.com/MikeOrtiz/92fc07d4761ce6e0b4d3" rel="nofollow noreferrer">Here are the logs</a> from calling <code>adb shell dmesg</code> on a Nexus 5 after plugging in the USB device. You can clearly see on lines 4-16 that the phone fails to enumerate the device.</p>
| 0non-cybersec
| Stackexchange |
[NO SPOILERS] even undead are not spared from " eat some more you look thin " by grandmas. | 0non-cybersec
| Reddit |
Saw the strange carrot pulled and thought about my first cucumber that developed into this. My father said " don't judge a book by its cover." I didn't respond but my though was , I wouldn't eat a book so that's simple. He cut it up and ate it.. | 0non-cybersec
| Reddit |
Side plank foot placement. First off, sorry if this has been talked about before, but I couldn't find it in the FAQ or exercise wiki.
My question is, are there any advantages or disadvantages to the different foot placements in the side plank?
I was first taught to perform it like this http://mandee.files.wordpress.com/2008/03/side-plank.jpg with one foot on the other, but if I am barefoot I feel like the bones in my feet are going to crumble
More recently I started doing it like this http://www.sparkpeople.com/assets/exercises/Side-Plank.gif just because I can hold it longer and my ankles don't go out before my obliques. Am I doing it wrong? Should I switch back to the foot on foot and deal with the pain or am I good doing the one foot in front of the other?
Here is a slightly nsfw pic of the second version http://i.imgur.com/dqrk3BF.jpg | 0non-cybersec
| Reddit |
The Point of Hollandaise?. Okay, serious question, not trolling.
I've always felt like I've missed the point of hollandaise, specifically in the context of Eggs Benedict. It's a pain to make right and is basically just adding a redundant egg sauce to eggs. I also tend to batch-cook my dinners ahead of time (single dude on a budget!), and the fact that it doesn't keep makes experimenting with other hollandaise vehicles like asparagus or chicken somewhat impractical.
Since hollandaise is one of the classic sauces, I feel like I should learn how to do it right. What am I not understanding? Have I always had bad hollandaise? Is it just not to my taste?
[UPDATE](https://www.reddit.com/r/Cooking/comments/e5m0cm/update_the_point_of_hollandaise/?utm_medium=android_app&utm_source=share) | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Parse String date in (yyyy-MM-dd) format. <p>I have a string in the form "2013-09-18". I want to convert it into a java.util.Date.
I am doing this</p>
<pre><code>SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Date convertedCurrentDate = sdf.parse(currentDateText);
</code></pre>
<p>The convertedCurrentDate is coming as 'Wed Sep 18 00:00:00 IST 2013'</p>
<p>I want my output in the form '2013-09-18'</p>
<p>Hour, minutes and seconds shouldnt come and it should be in the form yyyy-MM-dd.</p>
| 0non-cybersec
| Stackexchange |
How to have only 1 ListView item active and others disabled in a Xamarin Forms app (android). <p>Having a ListView as below with items that represent <code>Tasks</code> with their respective <code>Status</code>: </p>
<p><a href="https://i.stack.imgur.com/6w4XO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6w4XO.png" alt="ListView"></a></p>
<p>The <code>TasksPage</code> XAML: </p>
<pre><code><?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:iFacilityMob;assembly=iFacilityMob"
x:Class="iFacilityMob.TasksPage">
<ContentPage.Content>
...
<ListView
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
x:Name="TasksListView"
HasUnevenRows="True"
SeparatorVisibility="None"
SelectionMode="None"
IsPullToRefreshEnabled="True"
Refreshing="TasksListView_OnRefreshing"
CachingStrategy="RetainElement">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<local:TaskCardTemplate></local:TaskCardTemplate>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
...
</ContentPage.Content>
</code></pre>
<p></p>
<p>TaskCardTemplate XAML:</p>
<pre><code><ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="iFacilityMob.TaskCardTemplate">
<ContentView.Content>
<Frame x:Name="Frame"
IsClippedToBounds="True"
HasShadow="True"
Padding="2,5,5,2"
BackgroundColor="White"
Margin="10"
CornerRadius="5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<!-- Vertical colored bar on the left which indicates the current Status -->
<BoxView x:Name="BVInitial" Grid.Row="0" Color="Green" IsVisible="{Binding InitialStatus}" Grid.RowSpan="2" Grid.Column="0" WidthRequest="8" Margin="0" CornerRadius="3"/>
<BoxView x:Name="BVStarted" Grid.Row="0" Color="DarkOrange" IsVisible="{Binding Started}" Grid.RowSpan="2" Grid.Column="0" WidthRequest="8" Margin="0" CornerRadius="3"/>
<BoxView x:Name="BVPaused" Grid.Row="0" Color="DodgerBlue" IsVisible="{Binding Paused}" Grid.RowSpan="2" Grid.Column="0" WidthRequest="8" Margin="0" CornerRadius="3"/>
<BoxView x:Name="BVFinished" Grid.Row="0" Color="Black" IsVisible="{Binding Finished}" Grid.RowSpan="2" Grid.Column="0" WidthRequest="8" Margin="0" CornerRadius="3"/>
<!-- Button Start -->
<Button Grid.Row="0" Grid.Column="1" x:Name="BtnStartTask" Text="Start" TextColor="White" BackgroundColor="Green" CornerRadius="5" Margin="5,5,0,0" HeightRequest="40"
Clicked="BtnStartTask_OnClicked" IsEnabled="{Binding StartEnabledAndVisible}" IsVisible="{Binding StartEnabledAndVisible}" CommandParameter="{Binding .}" />
<!-- Button Pause -->
<Button Grid.Row="0" Grid.Column="1" x:Name="BtnPauseTask" Text="Pause" TextColor="White" BackgroundColor="DodgerBlue" CornerRadius="5" Margin="5,5,0,0" HeightRequest="40"
Clicked="BtnPauseTask_OnClicked" IsEnabled="{Binding PauseEnabled}" IsVisible="{Binding PauseVisible}" CommandParameter="{Binding . }" />
<!-- Button End -->
<Button Grid.Row="1" Grid.Column="1" x:Name="BtnEndTask" Text="End" TextColor="White" BackgroundColor="Red" CornerRadius="5" Margin="5,0,0,5" HeightRequest="40"
Clicked="BtnEndTask_OnClicked" IsEnabled="{Binding EndEnabled}" CommandParameter="{Binding .}" />
...
<!-- The data of each Task, not important in this case -->
</Grid>
</Frame>
</ContentView.Content>
</code></pre>
<p></p>
<p>By clicking the buttons I can change the Status and the view of any <code>Task</code> item.</p>
<pre><code>private async void BtnStartTask_OnClicked(object sender, EventArgs e)
{
var btn = (Button)sender;
if (btn.CommandParameter is TaskViewModel model)
{
// Task
if (model.ModelType == Enums.ModelType.Task.ToString())
{
await _api.UpdateStatus(new StatusUpdateDTO
{ID = model.ID, ModelType = Enums.ModelType.Task.ToString(), StatusID = (int) Enums.TaskStatus.Started});
}
else// Ticket
{
await _api.UpdateStatus(new StatusUpdateDTO
{ ID = model.ID, ModelType = Enums.ModelType.Ticket.ToString(), StatusID = (int)Enums.TicketStatus.Assigned });
}
UpdateView(Enums.Buttons.Start);
}
</code></pre>
<p>}</p>
<pre><code>private void UpdateView(Enums.Buttons buttonPressed)
{
switch (buttonPressed)
{
case Enums.Buttons.Start:
// Hide Start
BtnStartTask.IsEnabled = false;
BtnStartTask.IsVisible = false;
// Show Pause
BtnPauseTask.IsEnabled = true;
BtnPauseTask.IsVisible = true;
// Enable End
BtnEndTask.IsEnabled = true;
BtnEndTask.IsVisible = true;
BVStarted.IsVisible = true;
BVFinished.IsVisible = false;
BVInitial.IsVisible = false;
BVPaused.IsVisible = false;
break;
case Enums.Buttons.Pause:
...
case Enums.Buttons.End:
...
}
}
</code></pre>
<p>How can I achieve that once a <code>Task</code> is <code>Started</code>, I somehow disable (an overlay and buttons disabled) all the other <code>Tasks</code> and eventually re-enable them when the active Task is <code>Paused</code> or was <code>Ended</code> ?</p>
<p>Edit:</p>
<p>TasksPage ViewModel:</p>
<pre><code>public class TaskViewModel: INotifyPropertyChanged
{
public int ID { get; set; }// TaskID or TicketID
public string ModelType { get; set; }// Task or Ticket
public string Title { get; set; }
public string Description { get; set; }
public int FloorID { get; set; }
public string FloorName { get; set; }
public int AreaID { get; set; }
public string AreaName { get; set; }
public int? ScheduledTaskID { get; set; }
public int? ScheduleID { get; set; }
private int _statusID { get; set; } // Task Status or TicketTask
public int StatusID
{
get => _statusID;
set
{
_statusID = value;
OnPropertyChanged();
}
}
public bool ActiveItem => (IsTask && (StatusID == (int) Enums.TaskStatus.Started )) || IsTicket && (StatusID == (int) Enums.TicketStatus.InProgress);
public bool NotActive => !ActiveItem;
public List<ProductDTO> Products { get; set; }
public bool IsTask => ModelType == ModelTypes.Task.ToString();
public bool IsTicket => ModelType == ModelTypes.Ticket.ToString();
public bool StartEnabledAndVisible
{
get
{
if (IsTask && StatusID == (int)Enums.TaskStatus.Created || StatusID == (int) Enums.TaskStatus.Paused)
{
return true;
}
return IsTicket && StatusID == (int) Enums.TicketStatus.Assigned;
}
}
public bool PauseEnabled
{
get
{
if (IsTask && StatusID == (int)Enums.TaskStatus.Started)
{
return true;
}
return IsTicket && StatusID == (int)Enums.TicketStatus.InProgress;
}
}
public bool PauseVisible
{
get
{
if (IsTask && StatusID == (int)Enums.TaskStatus.Started || StatusID == (int)Enums.TaskStatus.Finished)
{
return true;
}
return IsTicket && StatusID == (int)Enums.TicketStatus.InProgress || StatusID == (int)Enums.TicketStatus.Closed;
}
}
public bool EndEnabled
{
get
{
if (IsTask && StatusID == (int)Enums.TaskStatus.Started || StatusID == (int)Enums.TaskStatus.Paused)
{
return true;
}
return IsTicket && StatusID == (int)Enums.TicketStatus.InProgress || StatusID == (int)Enums.TicketStatus.Assigned;
}
}
public bool InitialStatus => IsTask && StatusID == (int) Enums.TaskStatus.Created || IsTicket && StatusID == (int)Enums.TicketStatus.Assigned;
public bool Started => IsTask && StatusID == (int)Enums.TaskStatus.Started || IsTicket && StatusID == (int)Enums.TicketStatus.InProgress;
public bool Paused => IsTask && StatusID == (int)Enums.TaskStatus.Paused || IsTicket && StatusID == (int)Enums.TicketStatus.Assigned;
public bool Finished => IsTask && StatusID == (int)Enums.TaskStatus.Finished || IsTicket && StatusID == (int)Enums.TicketStatus.Closed;
public string ProductsLabel
{
get
{
return Products != null ? string.Join(", ", Products.Select(p => p.Name)) : "";
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
</code></pre>
<p>And in TasksPage, the parent page: </p>
<pre><code>protected override async void OnAppearing()
{
_scheduledTasks = new ObservableCollection<TaskViewModel>(_schedule.ScheduledTasks.OrderBy(st => st.Finished));
TasksListView.ItemsSource = _scheduledTasks;
}
</code></pre>
<p>TasksPage model:</p>
<pre><code>public class ScheduleDTO
{
public int ScheduleID { get; set; }
public DateTime ScheduleDate { get; set; }
public int WorkerID { get; set; }
public bool OnHoliday { get; set; }
public DateTime StartDatetime { get; set; }
public DateTime StopDatetime { get; set; }
public DateTime CurrentDateTime { get; set; }
public DateTime? LoggedInTime { get; set; }
public DateTime? LoggedOutTime { get; set; }
public string LateReason { get; set; }
public string EarlyLogoutReason { get; set; }
public string LateLogoutReason { get; set; }
// This should be the source for the Listview
public List<TaskViewModel> ScheduledTasks { get; set; }
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Quadratic equation with greatest integer functioin. <p>$[x]^2-7[x]+12=0$</p>
<p>find $x$?
where $[x]$ is Greatest Integer function </p>
<p>I have tried to solve the question like this:
putting $[x]=y$ , we have the equation:
$y^2-7x+12=0$
by solving this equation we get $y=3$ and $y=4$ </p>
<p>since $y=[x]$, therefore $[x]=3$ and $[x]=4$</p>
<p>according to the above statement we can say that $x=[3,5)$</p>
<p>I want to know weather my solution is correct or not.
and if it not correct then how to solve this equation.</p>
| 0non-cybersec
| Stackexchange |
Connecting two HDMI screen to laptop via type C port using USB hub. <p>Connecting two (USB 3.0 to HDMI adapter) to (Type C to 4 Port USB 3.0 HUB) and connecting the type c to my HP laptop windows 10 will works in order to connect two HDMI screen ?</p>
<p>example of hardware:</p>
<ul>
<li><p>Type C to 4 Port USB 3.0 HUB (<a href="https://www.aliexpress.com/item/USB-C-3-1-Type-C-to-4-Port-USB-3-0-HUB-Adapter-For-Apple/32710545605.html" rel="nofollow noreferrer">https://www.aliexpress.com/item/USB-C-3-1-Type-C-to-4-Port-USB-3-0-HUB-Adapter-For-Apple/32710545605.html</a>)</p></li>
<li><p>USB 3.0 to HDMI Output (<a href="https://www.aliexpress.com/item/5Gbps-Input-USB-3-0-to-HDMI-Output-Graphic-Adapter-1080P-Cable-Converter-for-MAC-HDTV/32825312669.html" rel="nofollow noreferrer">https://www.aliexpress.com/item/5Gbps-Input-USB-3-0-to-HDMI-Output-Graphic-Adapter-1080P-Cable-Converter-for-MAC-HDTV/32825312669.html</a>)</p></li>
</ul>
| 0non-cybersec
| Stackexchange |
How to Find Fonts on any Image or Photo?. | 0non-cybersec
| Reddit |
Rainbow Tables: What is the Reduction Used for?. <p>This is a follow up from <a href="https://security.stackexchange.com/questions/379/what-are-rainbow-tables-and-how-are-they-used/440#440">this answer</a>.</p>
<p>The answer is very good, and it put me to thinking and doing some research. I have found another good explanation on <a href="http://kestas.kuliukas.com/RainbowTables/" rel="nofollow noreferrer">this site</a>.</p>
<p>At some point, the author says:</p>
<blockquote>
<p>If the set of plaintexts is [0123456789]{6} (we want a rainbow table of all numeric passwords of length 6), and the hashing function is MD5(), a hash of a plaintext might be MD5("493823") -> "222f00dc4b7f9131c89cff641d1a8c50".
In this case the reduction function R() might be as simple as taking the first six numbers from the hash; R("222f00dc4b7f9131c89cff641d1a8c50") -> "222004".
We now have generated another plaintext from the hash of the previous plaintext, this is the purpose of the reduction function.</p>
</blockquote>
<p>However, I don't seem to have grasped the use of the reduction as it seems pretty arbitrary. How does reducing a hash to its first numbers help retrieving the plaintext. Is the choosing of the reduction (that is selecting the first few number of the hash) really arbitrary? Could I instead of taking the <strong>first</strong> six numbers use, say, the <strong>last</strong> six numbers?</p>
| 1cybersec
| Stackexchange |
Making the iPhone vibrate. <p>How can the iPhone be set to vibrate once?</p>
<p>For example, when a player loses a life or the game is over, the iPhone should vibrate.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
MRW I spent 3 hours downloading a movie to find out it was dubbed to German. | 0non-cybersec
| Reddit |
Windows Vista: Folder options not working. <p>I'm running Windows Vista Service Pack 2. </p>
<p>I have the Folder Options set to "Open each folder in the same window."<br>
(Organize | Folder Options | General).</p>
<p>Each time I open a folder, it opens in a new window.</p>
<p>How do I get it to open each folder in the same window?</p>
<p>I have tried the following techniques with no success: </p>
<ol>
<li>Expand number of MBAG entries in Registry. (The number is 40,000 now.) </li>
<li>Delete Bags and MBAG entries in Registry. (Rebooted machine after, still no success). </li>
<li>Change to "Open each folder in its own window". Saved, then changed back. </li>
<li>Under View tab, changed "Remember each folder's view settings":<br>
unchecked, Apply to Folders, checked, Apply to folders. </li>
<li>Applied application from Annoyances.org. Still no success. </li>
<li>Clicked on Reset Default Options, then OK. (Opening in same fold is a default option!)<br>
Still unsucessful.</li>
</ol>
<p>I want the folders to open in the same window, just like the options say.</p>
| 0non-cybersec
| Stackexchange |
we love you notch, happy 39th b-day. | 0non-cybersec
| Reddit |
Should C# enums end with a semi-colon?. <p>In C#, it appears that defining an enum works with or without a semi-colon at the end:</p>
<pre><code>public enum DaysOfWeek
{ Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday} ; //Optional Semicolon?
</code></pre>
<p>This <a href="http://msdn.microsoft.com/en-us/library/sbbt4032.aspx" rel="noreferrer">C# page from MSDN</a> shows enums ending with semicolons, except for the <code>CarOptions</code>.</p>
<p>I haven't found any definitive reference, and both ways appear to work without compiler warnings.</p>
<p>So should there be a final semicolon or not?</p>
| 0non-cybersec
| Stackexchange |
AndroidStudio show usage of RAM. <p>I have seen on other AndroidStudio-pictures, that there is a RAM usage at the right bottom. I tried to setup this statuslist o the bottom. But a rightclick didn`t help me. How can I switch on the RAM usage in AndroidStudio ?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
TIL about Julie d'Aubigny a 17th-century swordswoman and opera singer. That married a guy, left him to perform, then met a girl, whom was thrown into a convent, which she infiltrated to get her out. They run away by stealing the body of a dead nun, placing in the bed and lighting the room on fire.. | 0non-cybersec
| Reddit |
Prove that $(ab+ac+bc)\sum\limits_{cyc}\frac{1}{(a-7b)^2}\geq\frac{1}{4}$. <blockquote>
<p>Let $a$, $b$ and $c$ be non-negative numbers such that $\prod\limits_{cyc}(a-7b)\neq0$. Prove that:
$$(ab+ac+bc)\left(\frac{1}{(a-7b)^2}+\frac{1}{(b-7c)^2}+\frac{1}{(c-7a)^2}\right)\geq\frac{1}{4}$$</p>
</blockquote>
<p>I think this inequality is very interesting </p>
<p>because it's similar to the known Ji Chen's inequality (Iran 1996):
$$(ab+ac+bc)\left(\frac{1}{(a+b)^2}+\frac{1}{(b+c)^2}+\frac{1}{(c+a)^2}\right)\geq\frac{9}{4}$$</p>
<p>Example of my trying.</p>
<p>BW does not help:</p>
<p>Let $a=\min\{a,b,c\}$, $b=a+u$ and $c=a+v$.</p>
<p>Hence, we need to prove that:</p>
<p>$$44064(u^2-uv+v^2)a^4+864(38u^3+17u^2v+73uv^2+38v^3)a^3-$$
$$-24(217u^4-1478u^3v-2157u^2v^2-3494uv^3+217v^4)a^2+$$
$$+4(98u^5-1631u^4v+3938u^3v^2+15698u^2v^3-1463uv^4+98v^5)a+$$
$$+uv(196u^4-2793u^3v+10490u^2v^2-2457uv^3+196v^4)\geq0,$$
which is nothing. </p>
<p>Thank you!</p>
| 0non-cybersec
| Stackexchange |
What's the worst excuse you've ever heard that turned out to be true?. | 0non-cybersec
| Reddit |
Stripe: webhook events order. <p>How should you handle the fact that events received via webhooks can be received in random order ?</p>
<p>For instance, given the following ordered event:</p>
<ul>
<li>A: invoiceitem.created (with quantity of 1)</li>
<li>B: invoiceitem.updated (with quantity going from 1 to 3)</li>
<li>C: invoiceitem.updated (with quantity going from 3 to 2)</li>
</ul>
<p>How do you make sure receiving C-A-B does not result in corrupted data (ie with a quantity of 2 instead of 3)?</p>
<p>You could <strong>reject the webhook if the previous_attributes in Event#data do not correspond to the current state</strong>, but then you are stuck if your local model was updated already, as you will never find yourself in the state expected by the webhook.</p>
<p>Or you can just use <strong>treat any webhook as a hint to retrieve and update an object</strong>. You just disregard the data sent by the webhook and always retrieve it.
Even if you receive events ordered as update/delete/create it should work, as update would in fact create the object, delete would delete it, and create would fail to retrieve the object and do nothing.
But it feels like a waste of resources to retrieve data each time when the webhook offers it as event data.</p>
<p>This question was <a href="https://stackoverflow.com/questions/31775335/stripe-webhooks-events-order">asked before</a> but the answers don't cover the above solutions.</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
What specific algebraic properties are broken at each Cayley-Dickson stage beyond octonions?. <p>I'm starting to come around to an understanding of hypercomplex numbers, and I'm particularly fascinated by the fact that certain algebraic properties are broken as we move through each of the $2^n$ dimensions. I think I understand the first $n<4$ instances:</p>
<ul>
<li>As we move from $\mathbb{R}$ to $\mathbb{C}$ we lose ordering</li>
<li>From $\mathbb{C}$ to $\mathbb{H}$ we lose the commutative property</li>
<li>From $\mathbb{H}$ to $\mathbb{O}$ we lose the associative property (in the form of $(xy)z \neq x(yz)$, but apparently it's still alternative and $(xx)y = x(xy)$. Is that right?)</li>
<li>The move from $\mathbb{O}$ to $\mathbb{S}$ is where I start to get fuzzy. From what I've read, the alternative property is broken now, such that even $(xx)y \neq x(xy)$ but that also zero divisors come into play, thus making sedenion algebra non-division.</li>
</ul>
<p>My first major question is: Does the loss of the alternative property cause the emergence of zero divisors (or vice versa) or are these unrelated breakages?</p>
<p>My bigger question is: What specific algebraic properties break as we move into 32 dimensions, then into 64, 128, 256? I've "read" the de Marrais/Smith paper where they coin the terms pathions, chingons, routons and voudons. At my low level, any initial "reading" of such a paper is mostly just intent skimming, but I'm fairly certain they don't address my question and are focused on the nature and patterns of zero divisors in these higher dimensions. If the breakages are too complicated to simply explicate in an answer here, I'm happy to do the work and read journal articles that might help me understand, but I'd appreciate a pointer to specific papers that, given enough study, will actually address the point of my specific interest--something I can't necessarily tell with an initial glance, and might need a proper mathematician to point me in the right direction.</p>
<p>Thank you!</p>
<p>UPDATE: If the consensus is that this is a repeat, then ok, but I don't see how the answers to the other question about <em>why</em> algebraic properties break answers my questions about <em>what</em> algebraic properties break. Actually, the response marked as an answer in that other question doesn't actually answer that question either. It provides a helpful description of how to construct a multiplication table for higher dimension Cayley-Dickson structures, but explicitly doesn't answer the question as to why the properties break. </p>
<p>The Baez article many people suggest in responses to all hyper-complex number questions like mine is truly excellent, but is mostly restricted to octonions, and, in the few mentions it makes of higher dimension Cayley-Dickson algebras, does not refer to what properties are broken. </p>
<p>Perhaps the question isn't answerable, but in any case it hasn't been answered in this forum. </p>
<p>UPDATE 2: I should add that the sub question in this post about whether the loss of the alternative property specifically leads to the presence of zero divisors in sedenion algebra is definitely unique to my question. However, perhaps I should pose that as a separate question? Sorry, I'm not sure about that aspect of forum etiquette here. </p>
| 0non-cybersec
| Stackexchange |
Can I set the default resolution for a YouTube video?. <p>I'm posting some YouTube videos on my WordPress blog, but they always default to 360p, even though I've provided the &hd=1 parameter. The videos can go up to 1080p if the user selects it, and I'd like to set a default of at least 720p. I don't care if they bump it down or not.</p>
<p>Can this be done?</p>
| 0non-cybersec
| Stackexchange |
tool to do statistics in the linux command line. <p>say I run a command that outputs space separated values over lines. Some of which are numbers. Is there a utility I can use to calculate the mean, median, standard deviation of these numbers? something like 'cut' but that outputs these statistics. </p>
| 0non-cybersec
| Stackexchange |
Disappointed burglar leaves a note behind in Tamil Nadu. | 0non-cybersec
| Reddit |
Kid Bedroom with a Pirate Ship Inside. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Isn't Inactive memory a waste of resources?. <p>I'm looking for explanation of memory usage on my machine especially in light of the example in this screenshot below:</p>
<p><img src="https://i.stack.imgur.com/3WIAq.png" alt="Memory Usage"></p>
<p>I understand what is <code>Free</code> and <code>Active</code> means<br>
But what are the meanings of <code>Wired</code> and <code>Inactive</code>?</p>
<p>Especially <code>inactive</code>, why does it use so much memory for something that we do not use?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
[Video] Will Smith,"You don't set out to build a Wall. You don't say "I'mma build the biggest, baddest, greatest wall that's ever been built." You don't start there. You Say I'm gonna lay this brick as perfectly as a Brick can be laid. And, you do that every single day and soon, you have a WALL ...". | 0non-cybersec
| Reddit |
Cryptography - David R. Kohel. | 1cybersec
| Reddit |
Ewan McGregor Plays With Light Sabres - The Graham Norton Show - Series 9 Episode 12. | 0non-cybersec
| Reddit |
We all have that one friend that's just a little bit different. | 0non-cybersec
| Reddit |
Installing a package program ubuntu 14.04. <p>I want to install an engineering program (<code>spring_free</code>) on linux ( <a href="http://spring.delta-h.de/index.php/en/download-support" rel="nofollow noreferrer">http://spring.delta-h.de/index.php/en/download-support</a>), but I don't know how to do that.</p>
<p>There is an install file in the folder, although I am not familiar how to run it. In the installation there are some batch files, but I don't know how to use them. I would be grateful if you help me in this regards.</p>
<p><img src="https://i.stack.imgur.com/h8PPc.png" alt="Installation files in the folder"></p>
| 0non-cybersec
| Stackexchange |
Who done ya wrong? Who was that person who screwed you over and you can never forgive?. What did they do to you that will last in your memory forever? Maybe you have forgiven them, maybe you haven't, maybe you can't.
Bonus points if you can tell us how you tried to get them back.
My story to start us off: After 7.5 years dating and supporting a woman with 3 kids, spending well over $100,000 paying for food, mortgage, rehabilitating her credit, helping her refinance her house, she walks in one evening and tells me we are incompatible, it is over and she walks away with all of it. Six weeks later, she tells me she's in a new relationship. | 0non-cybersec
| Reddit |
Tenn. judge refuses to grant straight couple a divorce because … gay marriage. | 0non-cybersec
| Reddit |
Are there existing extensions to behavior trees that fascilitate node communication?. <p>I've been looking into behavior trees, but I cannot find a lot about them. The Wikipedia page pretty much only mentions sequence and selector nodes.</p>
<p>I have found implementations that also provide memory selector, memory sequence, and parallel sequence, as well as some decorators like inversion and repetition.</p>
<p>I found some papers that discuss some form of a "weighted" selector/sequence that queries its children for their utility/probability. This can also be used in machine learning to dynamically adjust those weights.</p>
<p>What I have not yet found much about is communication between nodes.
Some implementations use a shared "blackboard" where nodes can write values, but this seems rather clumsy, as it creates a huge lookup table that tightly couples different nodes.</p>
<p>I've been thinking more in terms of sending messages to the next node.
I think the bulk of the shared state is a condition/action providing a specific value to the next action (rather than just success).</p>
<p>Has there been any research in this area? I was not able to find anything.
I'm also curious to hear about other useful extensions.</p>
| 0non-cybersec
| Stackexchange |
Our little Beanie Baby. | 0non-cybersec
| Reddit |
ET/Star Wars logic. Alright so. If ET's kind exists in the Star Wars Universe, and "Star Wars" exists in the ET Universe...does that mean in the ET Universe "Star Wars" both exists 'in a galaxy far far away' AND as a Sci-Fi flick on Earth? (I know this is silly, and meaningless- just a thought!) | 0non-cybersec
| Reddit |
Dog.exe has been stunned. | 0non-cybersec
| Reddit |
How does Keras load_data() know what part of the data is the train and test set?. <p>I'm quite new to Keras and I wanted to begin with a <a href="https://elitedatascience.com/keras-tutorial-deep-learning-in-python" rel="nofollow noreferrer">tutorial</a>. There, let's say almost at the beginning, the code lines</p>
<blockquote>
<p>Load pre-shuffled MNIST data into train and test sets </p>
<p>(X_train, y_train), (X_test, y_test) = mnist.load_data()</p>
</blockquote>
<p>emerge. I wonder how Keras knows what of the data is part of the training and what is part of the testing? Though it's quite a basic question I'm not able to see the certain definition in the Keras documentation (the searching even does not provide any result there).
Therefore, I appreciate any help as I often cannot find any command definitions in <a href="http://faroit.com/keras-docs/1.2.0/search.html?q=load_data" rel="nofollow noreferrer">Keras</a>. For other languages, like C++, R, Python and so on it is quite easy to find some definitions. But for Keras, even google doesn't provide me useful searching results (at least not in the first 2 pages).</p>
<p>TL;DR: How does load_data() know what is train and test of the data set?</p>
| 0non-cybersec
| Stackexchange |
Build video - what do you think? Should I do more?. | 0non-cybersec
| Reddit |
how can i do angular routing to child to component. <p>i am trying to navigate to my child defined component but my router is not recognizing the given route.</p>
<p>route is like as follow :</p>
<p></p>
<p>in Router file i have defined something like this:</p>
<pre><code>const routes: Routes = [
{
path: "",
redirectTo: "products",
component: StandardproductsComponent,
pathMatch: "full",
canActivate: [AuthorizedGuardService],
},
{
path: "products",
component: StandardproductsComponent,
resolve: {
loaded: StandardsResolver
},
children: [
{
path: ":productId/types",
component: StandardtypesComponent,
// resolve: {
// loaded: StandardTypesResolver
// },
// canActivate: [AuthorizedGuardService]
}
]
}];
</code></pre>
<p>i won't able to do so like this way can anyone help me with this how can make my route workable.
i want to have route like this : v3/products/{productId}/types</p>
| 0non-cybersec
| Stackexchange |
"I miss threading movies, too, bro.". | 0non-cybersec
| Reddit |
Found at a car boot sale, bought out of curiosity for 20p. Owner didn't know either.. | 0non-cybersec
| Reddit |
Homebrew asked me to move macports now it does not work. <p>I'm using HomeBrew for my usual mac stuff but I need to do some experiments with other package managers. So I installed MacPorts. everything seems alright but brew doctor asks me to move it:</p>
<blockquote>
<p>warning: You have MacPorts or Fink installed:</p>
<p>This can cause trouble. You don't have to uninstall them, but you may want to </p>
<p>temporarily move them out of the way, e.g. sudo mv /opt/local ~/macports</p>
</blockquote>
<p>So I listened and moved it. And then in my bash profile I changed </p>
<p><code>export PATH="/opt/local/bin:/opt/local/sbin:$PATH"</code></p>
<p>to </p>
<p><code>export PATH="~/macports/bin:~/macports/sbin:$PATH"</code></p>
<p>and now when I when run <code>port ...</code> it gives me this error:</p>
<blockquote>
<p>-bash: /Users/foobar/macports/bin/port: /opt/local/libexec/macports/bin/tclsh8.5: bad interpreter: No such file or directory</p>
</blockquote>
<p>What am I doing wrong and how can I solve it?</p>
<p><strong>P.S.1.</strong> </p>
<p>I edited the <code>/Users/foobar/macports/bin/port</code> file as the admin and edited the first line from
<code>#!/opt/local/libexec/macports/bin/tclsh8.5</code></p>
<p>to</p>
<p><code>#!/Users/foobar/macports/libexec/macports/bin/tclsh8.5</code></p>
<p>now I get this new error:</p>
<blockquote>
<p>sources_conf must be set in /opt/local/etc/macports/macports.conf or in your /Users/foobar/.macports/macports.conf file
while executing
"mportinit ui_options global_options global_variations"
Error: /Users/foobar/macports/bin/port: Failed to initialize MacPorts, sources_conf must be set in /opt/local/etc/macports/macports.conf or in your /Users/foobar/.macports/macports.conf file</p>
</blockquote>
<p><strong>P.S.2.</strong> </p>
<p>changed all the <code>/opt/local</code>s to <code>~/macports</code>s in </p>
<p><code>/Users/foobar/macports/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_ci/bootstrap.sh</code> </p>
<p>and </p>
<p><code>/Users/foobar/macports/etc/macports/macports.conf</code></p>
<p>nothing changed!</p>
<p><strong>P.S.3.</strong></p>
<p>I see some of the guys here try to guid me towards removing/uninstalling MacPorts or HomeBrew. That's not what I'm asking for. I am able to revert all I did and make the MacPorts work again (in fact I just did that). My question is why HomeBrew Is saying that? what I happens If I don't do what it is asking for? What if I want the MacPorts too? and most importantly how make the MacPorts keep working after moving?</p>
| 0non-cybersec
| Stackexchange |
Using a struct in a header file "unknown type" error. <p>I am using Kdevelop in Kubuntu.
I have declared a structure in my datasetup.h file:</p>
<pre><code>#ifndef A_H
#define A_H
struct georeg_val {
int p;
double h;
double hfov;
double vfov;
};
#endif
</code></pre>
<p>Now when I use it in my main.c file</p>
<pre><code>int main()
{
georeg_val gval;
read_data(gval); //this is in a .cpp file
}
</code></pre>
<p>I get the following error:</p>
<blockquote>
<p>georeg_chain.c:7:3: error: unknown type name 'georeg_val'</p>
</blockquote>
<p>(This is in the <code>georeg_val gval;</code> line)</p>
<p>I would appreciate if anyone could help me resolve this error.</p>
| 0non-cybersec
| Stackexchange |
IamAn EMT working for Boston EMS, the sole 911 provider for the city of Boston. Our service is currently being featured on ABC's show "Boston EMS" AMA!. Feel free to ask any question about working in a busy urban setting, the TV show that is currently airing on ABC or anything else at all!
**My Proof:** http://imgur.com/3DqOCjz I've attached a picture of my badge (obfuscated) | 0non-cybersec
| Reddit |
[Homemade] It's ready ..Garlic fried rice , eggs, beef tapa..for breakfast.🇵🇭☕🍳🍽. | 0non-cybersec
| Reddit |
A pair of 3D-printed legs has sent a dog, born without front limbs, on his first ever run down a street. This video features the disabled animal happily sprinting into a normal dog’s life. | 0non-cybersec
| Reddit |
Not a good place to park. | 0non-cybersec
| Reddit |
My Minecraft clone written in C (2500 lines) ... includes online multiplayer.. | 0non-cybersec
| Reddit |
Should I use a server to do multiple services. <p>I want to ask, I want to build a DNS server, mail server, and DHCP server and possibly an SQL server in my office, the client to this server is less than 100. So, if I have a server, say, with RAM 12 GB , and CPU 3GHz, should I cram all the roles in one server or should I use virtualization and separate the SQL server and the other server?</p>
| 0non-cybersec
| Stackexchange |
Just a baby head I found in the woods.. | 0non-cybersec
| Reddit |
Mac OS X Network Issue. <p>I have a OS X Server application that is running on one of my servers. </p>
<p>It has Chat enabled and it works just fine, but it disconnects me and other clients often. </p>
<p>I assume that the issue comes from the network, but I can't be sure until I test it. </p>
<p>Any ideas for an application that give me a report of network crashes?</p>
<p>Beside that I am willing for any advices. </p>
<p>Thank you in advance! </p>
| 0non-cybersec
| Stackexchange |
Missing field in Apollo GraphQL Query. <p>I'm using react with Apollo and a F# backend. </p>
<p>When i make a query i get an error similar to this but i'm not sure why as it seems like stories is present in the response. </p>
<pre><code>Missing field stories in "{\"stories\":[{\"name\":\"Story1\",\"__typename\":\"Story\"},{\"name\":\"Story2\",\"__typename\":\
</code></pre>
<p>My code for making the query is: </p>
<pre class="lang-js prettyprint-override"><code>const client = new ApolloClient({
uri: '/graphql',
});
client
.query({
query: gql`
query testStoryQuery
{
stories
{
name
}
}
`
})
.then(result => console.log(result));
</code></pre>
<p>Finally the raw response returned by the server is:</p>
<pre><code>
{"data":"{\"stories\":[{\"name\":\"Story1\",\"__typename\":\"Story\"},{\"name\":\"Story2\",\"__typename\":\"Story\"},{\"name\":\"Story3\",\"__typename\":\"Story\"}]}"}
</code></pre>
<p>The only thing I've tried so far is jsonifying the response (i.e. the ") around fields, but it doesn't seem to find the field either way. </p>
<p>Update (extra info) </p>
<p>The full stack trace </p>
<p><a href="https://i.stack.imgur.com/cyAJh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cyAJh.png" alt="Stack trace of the browser error"></a></p>
<p>Any help would be appreciated, i'll continue working on it in the meantime. </p>
<p>Thank you :)</p>
| 0non-cybersec
| Stackexchange |
I need a resource for self-studying c*algebras.. <p>I have just started my phd program this semester, I have not worked before on $C^*-$algebras, my master was on Geometry. In my university only reading courses are offered. I have to learn $C^*-$algebras. I have not taken any courses on functional analysis too. I am studying the book " $C^*-$algebras and their automorphism groups" by Pedersen, I usually google each topic and take a look at Book by Murphy too. But I could not find a good resource that give me a good prospective, for example how should I use Gelfand representation in problems. I mean I am learning topics, but I cannot learn with deep depth that I can use stuff like tools in my work. And Also I undestood that Functional analysis is a priority for $C^*-$algebras, but I cannot find a good book for understanding deeply materials like weak and weak$^*$ topology. When I read theorems I understand them, but I could not understand these topics as well as I give ideas for solving theorems on my own, and I cannot enjoy studying. I would appreciate if you recommend me some good books for self studying both Functional analysis and $C^*-$algebras.</p>
| 0non-cybersec
| Stackexchange |
Prove the set [a, b] is perfect. <p>How can I prove (by definition) that, if <span class="math-container">$a, b \in \mathbb{R}$</span> and <span class="math-container">$a<b$</span>, then <span class="math-container">$[a, b]$</span> is equal to the set of accumulation (limit) points?</p>
<p>Let <span class="math-container">$(E, d)$</span> a metric space and <span class="math-container">$S \subseteq E$</span>.
<span class="math-container">$x \in E$</span> is a limit point if <span class="math-container">$(B_\varepsilon(x)-\lbrace x \rbrace ) \cap S \neq \emptyset$</span> for all <span class="math-container">$\varepsilon >0$</span></p>
| 0non-cybersec
| Stackexchange |
My 9 yo son was flipping me while I wasn't looking. . We had a talk. When I finished the conversation, I started to walk away. Something made me to turn back and I saw him quickly hiding the middle finger behind his back. I felt like my parent's prestige had been undermined. I told him if I see it again I would break his finger. Not the right choice of words, but it got me mad. What do I do in this situation? He wouldn't dare to flip me directly. How would you react? | 0non-cybersec
| Reddit |
Evaluate $\lim\limits_{n \to \infty}\sum\limits_{k=1}^{n}\frac{\sqrt[k]{k}}{\sqrt{n^2+n-nk}}$. <blockquote>
<p><span class="math-container">$$\lim_{n \to
\infty}\sum_{k=1}^{n}\frac{\sqrt[k]{k}}{\sqrt{n^2+n-nk}}$$</span></p>
</blockquote>
<p>How to consider it?</p>
| 0non-cybersec
| Stackexchange |
Win RT - universal app with barcode scanner. <p>I am developing a universal app for both Windows 8.1 and Windows Phone 8.1 which I want to be able to scan barcodes. For Windows 8.1, there exists a native class BarcodeScanner which is unfortunately inaccessible for Windows Phone 8.1 (I really don't understand what led Microsoft to do it this way). I found a 3rd party solution called zxing, but <a href="https://stackoverflow.com/questions/23472248/how-to-adjust-zxing-on-windows-phone-store-app-8-1-camera-mediacapture-preview">here</a> I have read that it works terribly for universal apps. What is the best way to implement barcode scanning functionality in universal apps?</p>
<p>Thank you!</p>
| 0non-cybersec
| Stackexchange |
X.Org vs. XQuartz - MacPorts. <p>After installing MacPorts and some software through that way, I noticed that MacPorts installed X.Org.
I've already installed XQuartz years ago and I'm really fine with it.</p>
<p>My 1. question is:
Do I need the installed X.Org from MacPorts to run software like KeepNote or Gedit, which was installed automatically by MacPorts, or <strong>am I free to uninstall X.Org</strong> and leave XQuartz instead?</p>
<p>My 2. question is: What about the other way round? Keeping the automatically installed X.Org and remove XQuartz?</p>
<p>edit: changed the question and added a second one.</p>
| 0non-cybersec
| Stackexchange |
How to join group in Telegram group based on an invite code. <p>Someone provide this: tg://join?invite=EaEnSUPktgfoI-xxxxxxxx</p>
<ol>
<li>How do I join that group in web based version of Telegram? </li>
<li>I tried that link in my Chrome browser but it just did a Google search. </li>
</ol>
<p>These are the menu options in the web-based Telegram. </p>
<p><a href="https://i.stack.imgur.com/TOrCG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TOrCG.jpg" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
tell me boys, Nurse Joy or Officer Jenny?. i'd go for nurse joy | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Sphinx Autodoc vs. Coverage: Am I missing something here?. <p>I'm trying to use Sphinx to document a Python package which contains various sub-packages and sub-modules. I followed the stock Sphinx quickstart script which produced various files with <code>autodoc</code> directives that, in turn, with the <code>html</code> generator, produced a mostly-as-expected first-pass of the docs based on existing docstrings in the code. Cool.</p>
<p>Now enter <code>sphinx.ext.coverage</code>. With the project existing as it does after the "quickstart" script, running <code>sphinx-build -b coverage <other args></code> doesn't produce any meaningful output at all, just:</p>
<pre><code>Undocumented Python objects
===========================
</code></pre>
<p>...with nothing at all below it. I deliberately remove some docstrings to make sure, and sure enough, no warnings.</p>
<p>I thrashed around for a while and eventually tried using the non-<code>autodoc</code> directives, and lo and behold, <code>coverage</code> suddenly appears to work. Sadly, the <code>autodoc</code> functionality is a large part of what makes Sphinx appealing in the first place. But OK, putting in a <code>.. py:module::</code> directive for each of the modules helps; it appears to make the <code>coverage</code> extension aware of my modules, and from there I start to get entries in my <code>python.txt</code> about members within those modules that don't have docstrings. That's great, but it appears to mean that for <code>coverage</code> to report on a module, that module has to be explicitly, manually declared in the doc files, which kinda reduces the value of a <code>coverage</code> tool (i.e. if I add a new module to the package, it appears it won't be included in the coverage report until I specifically add a directive for it.) So, what I'm seeing is that <code>autodoc</code> seems capable of automatically traversing sub-modules/packages, but <code>coverage</code> does not. </p>
<p><strong>Question</strong>: Am I missing something? The inability to automatically discover new code appearing in a project seems like a pretty <strong>glaring fault</strong> for a "coverage" tool. It seems to me like a standard coverage tool ought to be opt-out, not opt-in.</p>
<p>As I pushed further, I found even yet more evidence that <code>coverage</code> and <code>autodoc</code> aren't friends. For instance, even when declaring modules manually with <code>.. py:module::</code> directives (as described above), I find that <code>coverage</code> is not picking up on things like <code>autodoc</code>'s <code>exclude-members</code> directive. This directive, as expected, elides matching members from the generated output when building HTML, but <code>coverage</code> still reports those members as undocumented in its coverage report. From my reading </p>
<p><strong>Question</strong>: Is this incompatibility between <code>coverage</code> and <code>autodoc</code> noted somewhere in the docs that I've not been able to find? Or, again, am I missing something?</p>
| 0non-cybersec
| Stackexchange |
Looking for a decent pair of black jeans (Similar to 511s). I've owned 4 pairs of Levis jeans - 2 511s and 2 501s. The 511s had the best fit, but ultimately 3/4 of them have torn at the crotch for no apparent reason.
In a similar price range (or slightly more, willing to pay for a decent pair), what is similar to the 511s in terms of fit and feel? | 0non-cybersec
| Reddit |
Mechanical Keyboard (Aukey KM-G9) doesn't work after suspend. Ubuntu Gnome 17.04. <p>When I put on sleep my desktop computer, when I resume my keyboard (Aukey KM-G9) doesn't work. If I unplug and than plug it again, then it works.
I'm currently using Ubuntu Gnome 17.04 but I've got the same problem with 16.04. </p>
<p>Edit: I've tried my old keyboard and It does work after suspend. I don't know why with my new I've got this strange issue. The new one is a mechanical keyboard. </p>
<hr>
<p>Here's the <code>lsusb</code> output:</p>
<pre><code>Bus 002 Device 003: ID 046d:c246 Logitech, Inc. Gaming Mouse G300
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 04d9:a0cd Holtek Semiconductor, Inc.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 04e8:6124 Samsung Electronics Co., Ltd D3 Station External Hard Drive
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
</code></pre>
<hr>
<p>Here's <code>dmesg</code></p>
<pre><code>[ 504.725733] PM: Restoring platform NVS memory
[ 504.726015] Suspended for 3.327 seconds
[ 504.726588] Enabling non-boot CPUs ...
[ 504.737759] x86: Booting SMP configuration:
[ 504.737760] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 504.740110] cache: parent cpu1 should not be sleeping
[ 504.740186] microcode: sig=0x306a9, pf=0x2, revision=0x15
[ 504.740448] microcode: updated to revision 0x1c, date = 2015-02-26
[ 504.740515] CPU1 is up
[ 504.749709] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 504.752082] cache: parent cpu2 should not be sleeping
[ 504.752502] CPU2 is up
[ 504.765719] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 504.768096] cache: parent cpu3 should not be sleeping
[ 504.768917] CPU3 is up
[ 504.771282] ACPI: Waking up from system sleep state S3
[ 504.790007] ehci-pci 0000:00:1a.0: System wakeup disabled by ACPI
[ 504.790055] pcieport 0000:00:1c.7: System wakeup disabled by ACPI
[ 504.790097] ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
[ 504.790130] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
[ 504.790158] PM: noirq resume of devices complete after 18.442 msecs
[ 504.790438] PM: early resume of devices complete after 0.248 msecs
[ 504.790626] pcieport 0000:00:1c.4: System wakeup disabled by ACPI
[ 504.790677] usb usb5: root hub lost power or was reset
[ 504.790678] usb usb6: root hub lost power or was reset
[ 504.792657] tg3 0000:03:00.0 enp3s0: Link is down
[ 504.853346] rtc_cmos 00:02: System wakeup disabled by ACPI
[ 504.853865] serial 00:06: activated
[ 504.855289] sd 2:0:0:0: [sda] Starting disk
[ 504.855304] sd 3:0:0:0: [sdb] Starting disk
[ 505.167929] ata7: SATA link down (SStatus 0 SControl 300)
[ 505.168077] ata8: SATA link down (SStatus 0 SControl 300)
[ 505.227852] ata5: SATA link down (SStatus 0 SControl 300)
[ 505.227868] ata6: SATA link down (SStatus 0 SControl 300)
[ 505.227885] ata1: SATA link down (SStatus 0 SControl 300)
[ 505.227904] ata2: SATA link down (SStatus 0 SControl 300)
[ 505.227920] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 505.228478] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 505.228480] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 505.228482] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 505.228708] ata3.00: supports DRM functions and may not be fully accessible
[ 505.236331] ata3.00: disabling queued TRIM support
[ 505.240993] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 505.240995] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 505.240996] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 505.241220] ata3.00: supports DRM functions and may not be fully accessible
[ 505.248841] ata3.00: disabling queued TRIM support
[ 505.249738] usb 5-1: reset full-speed USB device number 2 using xhci_hcd
[ 505.253066] ata3.00: configured for UDMA/133
[ 505.253141] ata3.00: Enabling discard_zeroes_data
[ 506.845522] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 506.856069] ata4.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 506.856071] ata4.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 506.856073] ata4.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 506.915860] ata4.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 506.915863] ata4.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 506.915865] ata4.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 506.952740] ata4.00: configured for UDMA/133
[ 507.807435] tg3 0000:03:00.0 enp3s0: Link is up at 1000 Mbps, full duplex
[ 507.807436] tg3 0000:03:00.0 enp3s0: Flow control is on for TX and on for RX
[ 507.807438] tg3 0000:03:00.0 enp3s0: EEE is enabled
[ 526.032945] usbhid 5-1:1.2: reset_resume error -110
[ 526.033090] PM: resume of devices complete after 21243.710 msecs
[ 526.033301] PM: Finishing wakeup.
[ 526.033302] Restarting tasks ...
[ 526.033467] pci_bus 0000:05: Allocating resources
[ 526.033487] pci 0000:04:00.0: bridge window [io 0x1000-0x0fff] to [bus 05] add_size 1000
[ 526.033490] pci 0000:04:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 05] add_size 200000 add_align 100000
[ 526.033493] pci 0000:04:00.0: bridge window [mem 0x00100000-0x000fffff] to [bus 05] add_size 200000 add_align 100000
[ 526.033497] pci 0000:04:00.0: res[14]=[mem 0x00100000-0x000fffff] res_to_dev_res add_size 200000 min_align 100000
[ 526.033499] pci 0000:04:00.0: res[14]=[mem 0x00100000-0x002fffff] res_to_dev_res add_size 200000 min_align 100000
[ 526.033501] pci 0000:04:00.0: res[15]=[mem 0x00100000-0x000fffff 64bit pref] res_to_dev_res add_size 200000 min_align 100000
[ 526.033503] pci 0000:04:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] res_to_dev_res add_size 200000 min_align 100000
[ 526.033505] pci 0000:04:00.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
[ 526.033507] pci 0000:04:00.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
[ 526.033510] pci 0000:04:00.0: BAR 14: no space for [mem size 0x00200000]
[ 526.033511] pci 0000:04:00.0: BAR 14: failed to assign [mem size 0x00200000]
[ 526.033514] pci 0000:04:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
[ 526.033515] pci 0000:04:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[ 526.033517] pci 0000:04:00.0: BAR 13: no space for [io size 0x1000]
[ 526.033518] pci 0000:04:00.0: BAR 13: failed to assign [io size 0x1000]
[ 526.033521] pci 0000:04:00.0: BAR 14: no space for [mem size 0x00200000]
[ 526.033523] pci 0000:04:00.0: BAR 14: failed to assign [mem size 0x00200000]
[ 526.033525] pci 0000:04:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
[ 526.033526] pci 0000:04:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[ 526.033529] pci 0000:04:00.0: BAR 13: no space for [io size 0x1000]
[ 526.033530] pci 0000:04:00.0: BAR 13: failed to assign [io size 0x1000]
[ 526.033533] pci 0000:04:00.0: PCI bridge to [bus 05]
[ 526.046611] done.
[ 526.046622] video LNXVIDEO:00: Restoring backlight state
[ 526.203481] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[ 526.358290] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[ 529.389918] tg3 0000:03:00.0 enp3s0: Link is up at 1000 Mbps, full duplex
[ 529.389940] tg3 0000:03:00.0 enp3s0: Flow control is on for TX and on for RX
[ 529.389942] tg3 0000:03:00.0 enp3s0: EEE is enabled
[ 529.389961] IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready
[ 538.107665] usb 5-1: USB disconnect, device number 2
[ 538.109247] hid-generic 0003:04D9:A0CD.0002: usb_submit_urb(ctrl) failed: -19
[ 539.151869] usb 5-1: new full-speed USB device number 3 using xhci_hcd
[ 539.366001] usb 5-1: New USB device found, idVendor=04d9, idProduct=a0cd
[ 539.366003] usb 5-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 539.366005] usb 5-1: Product: USB Keyboard
[ 539.371653] input: USB Keyboard as /devices/pci0000:00/0000:00:1c.7/0000:06:00.0/usb5/5-1/5-1:1.0/0003:04D9:A0CD.0006/input/input16
[ 539.428241] hid-generic 0003:04D9:A0CD.0006: input,hidraw0: USB HID v1.11 Keyboard [USB Keyboard] on usb-0000:06:00.0-1/input0
[ 549.583676] hid-generic 0003:04D9:A0CD.0007: usb_submit_urb(ctrl) failed: -1
[ 549.583704] hid-generic 0003:04D9:A0CD.0007: timeout initializing reports
[ 549.583903] input: USB Keyboard as /devices/pci0000:00/0000:00:1c.7/0000:06:00.0/usb5/5-1/5-1:1.1/0003:04D9:A0CD.0007/input/input17
[ 549.643667] hid-generic 0003:04D9:A0CD.0007: input,hiddev0,hidraw3: USB HID v1.11 Keyboard [USB Keyboard] on usb-0000:06:00.0-1/input1
[ 549.646826] hid-generic 0003:04D9:A0CD.0008: hiddev0,hidraw4: USB HID v1.11 Device [USB Keyboard] on usb-0000:06:00.0-1/input2
</code></pre>
| 0non-cybersec
| Stackexchange |
People who work less than 6 hours a day and earn 6 figures, what do you do?. | 0non-cybersec
| Reddit |
ASP.NET - Redis Session State Provider - Session_End. <p>I'm using <a href="https://www.nuget.org/packages/Microsoft.Web.RedisSessionStateProvider/">RedisSessionStateProvider</a> within ASP.NET MVC application.</p>
<p>Everything works fine except that <code>Session_End</code> event never gets called.</p>
<pre><code>protected void Session_End(object sender, EventArgs e)
{
// Do stuff whenever a session ends
}
</code></pre>
<p>Here's my web.config:</p>
<pre><code><sessionState mode="Custom" customProvider="RedisSessionProvider" timeout="1">
<providers>
<add name="RedisSessionProvider" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="localhost:6379"
accessKey="" ssl="false"/>
</providers>
</sessionState>
</code></pre>
<p>Versions:</p>
<ul>
<li>Windows 10 Pro</li>
<li>ASP.NET MVC 5.2.2</li>
<li>Redis 2.8.2104 64-bit</li>
<li>Microsoft.Web.RedisSessionStateProvider 1.6.5</li>
</ul>
<p><strong>What's the proper way to implement custom logic whenever a session ends using RedisSessionStateProvider?</strong></p>
| 0non-cybersec
| Stackexchange |
Roblox fps unlocker - it shows it has to compress the file after the app using it closes. <p>I need help. My roblox fps unlocker tells me, once opened, and in roblox, it says rbxfpsunlocker.exe will be compressed only after the application using it closes. And it closes ROBLOX! Help, pls..</p>
| 0non-cybersec
| Stackexchange |
How can i use Raspberry PI to count how many times a switch is triggers on machines in a day?. What i need is a set of counting devices that count how many time the machines close/open in a day the machines already have a Switches on them, I've thought about the Raspberry PI to connect to this switch and then count how many times this switch is triggered, and then some way off viewing all the machines numbers in my office so i can see how the machines are running and whats not, and if possible views tables of how the machines have been running weekly/monthly to see what going on, on the factory floor i have about 32 machines on the factory floor. | 0non-cybersec
| Reddit |
Grannies on weed. | 0non-cybersec
| Reddit |
@Blogmarketing_L : https://t.co/0jrbcGEAKS - Food For Freedom - The Ultimate Survival Food Offer Is Here!. | 0non-cybersec
| Reddit |
This group creates some fabulous music with the most bizarre and unexpected items. | 0non-cybersec
| Reddit |
How to have overlapping under-braces and over-braces. <p>I am trying to typeset an equation that has overlapping over and under braces as per the image below:</p>
<p><img src="https://i.stack.imgur.com/DGtin.png" alt="enter image description here"></p>
<p>I have managed to typeset it using a sort of a hack, by typing the equation twice, once using <code>\phantom</code> commands and then raising it. Is there an easier way, perhaps a macro? MWE for the image above is shown below.</p>
<pre><code>\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\[a+b+\overbrace{c+d+e+f+g}^{x}+h+i+k+l=e^2\]
\vspace{-35pt}
\[\phantom{+b+c+d+}\underbrace{\phantom{e+f+g+h+i}}_{y}\phantom{+k+=e^2}\]
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange |
Is there a pattern for subscribing to hierarchical property changes with Reactive UI?. <p>Suppose I have the following view models:</p>
<pre><code>public class AddressViewModel : ReactiveObject
{
private string line;
public string Line
{
get { return this.line; }
set { this.RaiseAndSetIfChanged(x => x.Line, ref this.line, value); }
}
}
public class EmployeeViewModel : ReactiveObject
{
private AddressViewModel address;
public AddressViewModel Address
{
get { return this.address; }
set { this.RaiseAndSetIfChanged(x => x.Address, ref this.address, value); }
}
}
</code></pre>
<p>Now suppose that in <code>EmployeeViewModel</code> I want to expose a property with the latest value of <code>Address.Line</code>:</p>
<pre><code>public EmployeeViewModel()
{
this.changes = this.ObservableForProperty(x => x.Address)
.Select(x => x.Value.Line)
.ToProperty(this, x => x.Changes);
}
private readonly ObservableAsPropertyHelper<string> changes;
public string Changes
{
get { return this.changes.Value; }
}
</code></pre>
<p>This will only tick when a change to the <code>Address</code> property is made, but not when a change to <code>Line</code> within <code>Address</code> occurs. If I instead do this:</p>
<pre><code>public EmployeeViewModel()
{
this.changes = this.Address.Changed
.Where(x => x.PropertyName == "Line")
.Select(x => this.Address.Line) // x.Value is null here, for some reason, so I use this.Address.Line instead
.ToProperty(this, x => x.Changes);
}
</code></pre>
<p>This will only tick when a change to <code>Line</code> within the current <code>AddressViewModel</code> occurs, but doesn't take into account setting a new <code>AddressViewModel</code> altogether (nor does it accommodate a <code>null</code> <code>Address</code>).</p>
<p>I'm trying to get my head around the correct approach to solving this problem. I'm new to RxUI so I could be missing something obvious. I <em>could</em> manually hook into address changes and set up a secondary subscription, but this seems ugly and error-prone.</p>
<p><strong>Is there a standard pattern or helper I should be using to achieve this?</strong></p>
<p>Here is some code that can be copy/pasted to try this out:</p>
<p><em>ViewModels.cs</em>:</p>
<pre><code>namespace RxUITest
{
using System;
using System.Reactive.Linq;
using System.Threading;
using System.Windows.Input;
using ReactiveUI;
using ReactiveUI.Xaml;
public class AddressViewModel : ReactiveObject
{
private string line1;
public string Line1
{
get { return this.line1; }
set { this.RaiseAndSetIfChanged(x => x.Line1, ref this.line1, value); }
}
}
public class EmployeeViewModel : ReactiveObject
{
private readonly ReactiveCommand changeAddressCommand;
private readonly ReactiveCommand changeAddressLineCommand;
private readonly ObservableAsPropertyHelper<string> changes;
private AddressViewModel address;
private int changeCount;
public EmployeeViewModel()
{
this.changeAddressCommand = new ReactiveCommand();
this.changeAddressLineCommand = new ReactiveCommand();
this.changeAddressCommand.Subscribe(x => this.Address = new AddressViewModel() { Line1 = "Line " + Interlocked.Increment(ref this.changeCount) });
this.changeAddressLineCommand.Subscribe(x => this.Address.Line1 = "Line " + Interlocked.Increment(ref this.changeCount));
this.Address = new AddressViewModel() { Line1 = "Default" };
// Address-only changes
this.changes = this.ObservableForProperty(x => x.Address)
.Select(x => x.Value.Line1 + " CHANGE")
.ToProperty(this, x => x.Changes);
// Address.Line1-only changes
//this.changes = this.Address.Changed
// .Where(x => x.PropertyName == "Line1")
// .Select(x => this.Address.Line1 + " CHANGE") // x.Value is null here, for some reason, so I use this.Address.Line1 instead
// .ToProperty(this, x => x.Changes);
}
public ICommand ChangeAddressCommand
{
get { return this.changeAddressCommand; }
}
public ICommand ChangeAddressLineCommand
{
get { return this.changeAddressLineCommand; }
}
public AddressViewModel Address
{
get { return this.address; }
set { this.RaiseAndSetIfChanged(x => x.Address, ref this.address, value); }
}
public string Changes
{
get { return this.changes.Value; }
}
}
}
</code></pre>
<p><em>MainWindow.cs</em>:</p>
<pre><code>using System.Windows;
namespace RxUITest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.DataContext = new EmployeeViewModel();
}
}
}
</code></pre>
<p><em>MainWindow.xaml</em>:</p>
<pre><code><Window x:Class="RxUITest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<StackPanel>
<TextBlock Text="{Binding Changes}"/>
<Button Command="{Binding ChangeAddressCommand}">Change Address</Button>
<Button Command="{Binding ChangeAddressLineCommand}">Change Address.Line1</Button>
</StackPanel>
</Window>
</code></pre>
| 0non-cybersec
| Stackexchange |
Le mois de Ramadan fera disparaître israël #12. | 0non-cybersec
| Reddit |
PHP: PHP 7 ChangeLog. Security update. | 1cybersec
| Reddit |
My buddy of almost 2 decades went to the big dog park in the sky yesterday. His favorite way to sleep was with his tongue straight out and I managed to get a picture just after he woke up. Thanks for everything Casey, you are the good-est of all good boys :-). | 0non-cybersec
| Reddit |
An analysis problem about convergence. <p>Suppose that $f$ is a continuous function from $[a,b]$ to $[a,b]$. Let $x_0\in [a,b]$, and define by induction that $x_{n+1}=f(x_n)$. Show that $$\lim_{n \rightarrow \infty} (x_{n+1}-x_n)=0$$ implies $$\lim_{n \rightarrow \infty}x_n$$ exists.
(This problem is from a analysis book, and the author tells us the answer can be found in American Mathematical Monthly, volume 83(1976), page 273, which I have no access to, so you can either offer the reference or give the sketch of the proof. Thanks!)</p>
| 0non-cybersec
| Stackexchange |
Travel Photography/VLOG: 18-135 stm & 50mm f1.8 vs Sigma 18-35 f1.8. Dear reddit,
I'm travelling soon and would like to add some lenses to my collection before travelling.
I have an 80D with me, as well as a 10-18mm wide angle lens.
However, this is not enough and i'm currently considering the lenses i mentioned in the title, namely:
18-135mm stm kit lens
50mm f1.8
vs
Sigma 18-35mm f1.8
Do you think the 18-135 & 50mm is a good combo along with my wide angle lens?
Or
Should I get the Sigma instead?
I'll be taking photos of my gf, taking vlogs, photos of scenery as well as timelapses.
Or do you have any recommendations?
Any help is greatly appreciated!
ps: budget is around £500
**EDIT: Thanks for all the replies, however, im at work now. I'll read them later when i get home! :)**
| 0non-cybersec
| Reddit |
Algorithm for fast tag search. <p>The problem is the following.</p>
<ul>
<li>There's a set of simple entities E, each one having a set of tags T attached.
Each entity might have an arbitrary number of tags.
Total number of entities is near 100 million, and the total number of tags is about 5000.</li>
</ul>
<p>So the initial data is something like this:</p>
<pre><code>E1 - T1, T2, T3, ... Tn
E2 - T1, T5, T100, ... Tk
..
Ez - T10, T12, ... Tl
</code></pre>
<p>This initial data is quite rarely updated.</p>
<ul>
<li><p>Somehow my app generates a logical expression on tags like this:</p>
<p>T1&T2&T3 | (T5&!T6)</p></li>
<li><p>What I need to is to calculate a number of entities matching given expression (note - not the entities, but just the number). This one might be not totally accurate, of course. </p></li>
</ul>
<p>What I've got now is a simple in-memory table lookup, giving me a 5-10 seconds execution time on a single thread. </p>
<p>I'm curious, is there any efficient way to handle this stuff? What approach would you recommend? Is there some common algorithms or data structures for this?</p>
<p><strong>Update</strong></p>
<p>A bit of clarification as requested.</p>
<ol>
<li><code>T</code> objects are actually relatively short constant strings. But it doesn't actually matter - we can always assign some IDs and operate on integers.</li>
<li>We definitely can sort them.</li>
</ol>
| 0non-cybersec
| Stackexchange |
Gypsy Head done by Chelsea Jane @ Saints and Sinners in Garden Grove, CA. | 0non-cybersec
| Reddit |
mental laser beam. | 0non-cybersec
| Reddit |
Hi. Hoping someone here can help me. I have these 2 Mario toy things. They’re hollow hard plastic with a Japanese copyright on the reverse. Does anyone know where/when these are from? Thanks for any info.. | 0non-cybersec
| Reddit |
DIY mail server. | 0non-cybersec
| Reddit |
How do I increase the font size on Evernote?. <p>Is there a way to increase the font size on Evernote?</p>
<p>So far I've only been able to use the default size and changing the paragraph style (but it works only for a line).</p>
| 0non-cybersec
| Stackexchange |
Extreme Haunted House: Inside the Real Life Kingdom of Masochists (2015). | 0non-cybersec
| Reddit |
Quit it with the duck lips pics.... | 0non-cybersec
| Reddit |
Why is there an "age limit" on trick or treating?. I was listening to the radio this morning and lots of communities won't hand out candy to teenagers.
I feel like anyone, regardless of age should be able to trick or treat as long as they wear a costume. You are enganging with your community, neighbors, and people you normally wouldn't talk to. You have a fun time with friends dressing up, and if there wasn't a stigma that teenagers shouldn't trick or treat then they would be more likely to stay out of trouble.
I remember being 16-18 and dressing up with my friends and we all wanted to go trick or treat but felt emberrassed. We ended up driving around at night, running through yards, playing pranks, and smoking.
I recently started trick or treating with my brother and my niece, and we all dress up for her. It's really fun walking around and just exchanging a few words with neighbors, and checking out their costumes and decorations. | 0non-cybersec
| Reddit |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.